From d2cf29b67111e6fc01893f604e65a8638cd6f13c Mon Sep 17 00:00:00 2001 From: ianmacd <> Date: Tue, 26 Feb 2002 22:21:39 +0000 Subject: [PATCH] sudo now calls _root_command(), which is a wrapper around _command(), but also sets the PATH to include {,/usr{,/local}}/sbin --- bash_completion | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/bash_completion b/bash_completion index 975c9434..9fd454c2 100644 --- a/bash_completion +++ b/bash_completion @@ -1,6 +1,6 @@ # 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 # @@ -1474,6 +1474,16 @@ _command() } 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) # have p4 &&