Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Indeed. Not of any particular worth for long commands you'd want to rip out of the history due to their length, though.
OK you're talking about history rather than expansion.
My own preference is to do "set -o vi" as I do with ksh. Doing "esc-k" then will let me scroll through shell history. Once there I can do /pattern to search for a specific pattern in shell history. One of my favorites in doing this however is that I can simply hit "v" once I have the command back and that will open a vi session with the command in it - great for working out complicated pipelines then incorporating them within for loops.
When you specify `set show-all-if-ambiguous on' in .inputrc (the readline configuration file), you only have to press TAB once in bash to get the list of possible completions. Re-login after modifications:
# Produce list of all possible completions at single tab
set show-all-if-ambiguous on
# \[\e[0;34m\] : start blue
# \! : show history number of command
# \[\e[0m\] : stop blue
# \[\e[1;32m\] : start light green
# $(stoppedjobs) : execute shell function `stoppedjobs' which
# returns `%' plus number of jobs
# (see http://www.fvue.nl/wiki/Bash:_My_configuration)
# \[\e[0m\] : stop light green
# \u : show username
# \h : show hostname
# \w : show working directory
export PS1=$'\[\e[0;34m\]\!\[\e[0m\]\[\e[1;32m\]$(stoppedjobs)\[\e[0m\]:\u@\h:\w> '