From 59f672285fb8b87ca36a86a535e3f7fb42377788 Mon Sep 17 00:00:00 2001 From: ianmacd <> Date: Wed, 27 Feb 2002 08:55:30 +0000 Subject: [PATCH] - simplify _root_command() and actually install it for use by sudo --- bash_completion | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/bash_completion b/bash_completion index d358670f..cf2d3d79 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.157 2002/02/27 07:47:09 ianmacd Exp $ +# $Id: bash_completion,v 1.158 2002/02/27 09:55:30 ianmacd Exp $ # # Copyright (C) Ian Macdonald # @@ -1421,17 +1421,13 @@ _command() COMPREPLY=( $( compgen -f -- $cur ) ) fi } -complete -F _command -o filenames nohup exec nice eval strace sudo +complete -F _command -o filenames nohup exec nice eval strace _root_command() { - local OLDPATH=$PATH - - PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin - _command - PATH=$OLDPATH + PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin _command } -complete -F _command -o filenames sudo +complete -F _root_command -o filenames sudo # Perforce completion by Frank Cusack (frank@google.com) #