sudo now calls _root_command(), which is a wrapper around _command(), but also
sets the PATH to include {,/usr{,/local}}/sbin
This commit is contained in:
parent
cc9bfa1465
commit
d2cf29b671
@ -1,6 +1,6 @@
|
|||||||
# bash_completion - some programmable completion functions for bash 2.05a
|
# bash_completion - some programmable completion functions for bash 2.05a
|
||||||
#
|
#
|
||||||
# $Id: bash_completion,v 1.146 2002/02/26 21:48:32 ianmacd Exp $
|
# $Id: bash_completion,v 1.147 2002/02/26 23:21:39 ianmacd Exp $
|
||||||
#
|
#
|
||||||
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
||||||
#
|
#
|
||||||
@ -1474,6 +1474,16 @@ _command()
|
|||||||
}
|
}
|
||||||
complete -F _command -o filenames nohup exec nice eval strace sudo
|
complete -F _command -o filenames nohup exec nice eval strace sudo
|
||||||
|
|
||||||
|
_root_command()
|
||||||
|
{
|
||||||
|
local OLDPATH=$PATH
|
||||||
|
|
||||||
|
PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin
|
||||||
|
_command
|
||||||
|
PATH=$OLDPATH
|
||||||
|
}
|
||||||
|
complete -F _command -o filenames sudo
|
||||||
|
|
||||||
# Basic Perforce completion by Frank Cusack (frank@google.com)
|
# Basic Perforce completion by Frank Cusack (frank@google.com)
|
||||||
#
|
#
|
||||||
have p4 &&
|
have p4 &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user