Root! Root! Root!
Paul Sladen
sounder at paul.sladen.org
Tue Mar 15 11:12:34 UTC 2005
On Tue, 15 Mar 2005, russell cook wrote:
> I agree tab completion is great. When I remember (not always), I type
> the command and command line first
You don't need to do this. Edit '.bashrc' in your home-directory
and uncomment the last lines that say:
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc).
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
then open a new terminal (so that the script gets re-read with your changed
setting) and you can now do:
$ sud[tab]modp[tab]ee[tab]
and that'll get completed to:
$ sudo modprobe eepro100
since 'bash_completions' knows that certain commands (eg. modprobe) will be
followed by a module from '/lib/modules/$(uname -r)/...'. The same goes for
'cd' knowing that it will only be followed by a directory and not
normal files and lots, lots, more applications.
Hope that's useful---I have no idea why this isn't the default in
Ubuntu---it would really help people appreciate how useful sudo is!
-Paul
--
I didn't know it snowed here! London, GB
More information about the ubuntu-users
mailing list