Artix Linux Forum

Artix Linux => System => Topic started by: mardiyah on 23 August 2023, 10:59:34

Title: Need in the auto completion on sudo mod.
Post by: mardiyah on 23 August 2023, 10:59:34
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