jptech
March 3rd, 2010, 03:05 AM
Can anyone tell me how to get tab completion working with sudo in JeOS (Ubuntu Hardy) 8.04? Assuming I have the command '/usr/bin/svnadmin'. As a normal user I can type:
svnad + TAB...and it auto-completes as 'svnadmin'. If I type:
sudo svnad + TAB...nothing happens. My 'echo $SHELL' is '/bin/bash'. I tried enabling the following in '/etc/bash.bashrc':
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi...but it had no effect (I even tried a reboot to be sure). It's worth noting that tab completion works as I'd expect if I use absolute paths. For example:
sudo /usr/bin/svnad + TAB...auto-completes as I'd expect. I think I once read that there's some kind of configuration variable for sudo that causes it to use a 'more secure' path rather than the current path in the user's environment. I can't find any info on it though. I'm executing the commands from my home directory.
Can anyone help me?
svnad + TAB...and it auto-completes as 'svnadmin'. If I type:
sudo svnad + TAB...nothing happens. My 'echo $SHELL' is '/bin/bash'. I tried enabling the following in '/etc/bash.bashrc':
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi...but it had no effect (I even tried a reboot to be sure). It's worth noting that tab completion works as I'd expect if I use absolute paths. For example:
sudo /usr/bin/svnad + TAB...auto-completes as I'd expect. I think I once read that there's some kind of configuration variable for sudo that causes it to use a 'more secure' path rather than the current path in the user's environment. I can't find any info on it though. I'm executing the commands from my home directory.
Can anyone help me?