I'm not sure exactly how to describe this so bear with me. When I create a shortcut in CentOS for example, instead of typing the full path I can usually type ln -s `pwd`/ and then I press tab for it to print out the working directory before finishing the full path. In some distros I can't do this (use tab to complete) and I'm not sure what has to be set in the environment to make this work. In particular, I'm trying to do this in debian/ubuntu.
If I'm currently in /usr/local/morgan and want to create a shortcut named blah to the folder called "test" I would type:
ln -s `pwd`/test *press tab* and then it would become:
ln -s /usr/local/morgan/test
so all I have to do is hit spacebar and type "blah".
You might need a package called bash-completion.
But I'd see if bash-completion is in the repository for your distro. If not, wait for someone else to answer. :)
In AIX, I use 'Esc' followed by '\' for auto completion. I must warn you though that this isn't as neat as the bash "tab" feature because:
1) You do not get to see all possible options by hitting tab twice for a
given sequence of characters.
2) If there are more than one possibility for a given sequence, the prompt
just refuses to budge unless you give the next few characters.
Which version of Ubuntu are you using? Hardy and Jaunty at least have this completion facility by default. You do not need to install the package.
Check whether /etc/bash_completion exists and is sourced in at least one of /etc/bash.bashrc, /etc/profile and ~/.bashrc
|All times are GMT -5. The time now is 11:43 PM.|