Skip to main content
Topic: Need in the auto completion on sudo mod. (Read 491 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Need in the auto completion on sudo mod.

How can we improve the auto completion on sudo, as it should complete second argument, i.e. the rooted executable's first argument, with items of the current working directory files instead of that of executable files in PATH

The problem is can find this Bash completion only few of the sudo lines under /usr/share/bash-completion

in bash_completion:
...

 ...
Code: [Select]
_root_command()
{
    local PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin
    local root_command=$1
    _command
}
complete -F _root_command fakeroot gksu gksudo kdesudo really
..
..


and in completions/sudo line 54:
Code: [Select]
complete -F _sudo sudo sudoedit
Please one so expert on the Bash completion help