- make tilde expansion work during chown completion
This commit is contained in:
parent
d09b63e2e7
commit
02d4e529c1
@ -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.372 2002/06/25 15:48:33 ianmacd Exp $
|
# $Id: bash_completion,v 1.373 2002/06/26 05:30:50 ianmacd Exp $
|
||||||
#
|
#
|
||||||
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
||||||
#
|
#
|
||||||
@ -345,16 +345,18 @@ _chown()
|
|||||||
[ ${BASH_VERSINFO[1]} '>' 04 ]; then
|
[ ${BASH_VERSINFO[1]} '>' 04 ]; then
|
||||||
user=${cur%%?(\\)[.:]*}
|
user=${cur%%?(\\)[.:]*}
|
||||||
group=${cur#*[.:]}
|
group=${cur#*[.:]}
|
||||||
COMPREPLY=( $( compgen -P $user'\:' \
|
COMPREPLY=( $( compgen -P $user':' \
|
||||||
-g -- $group 2>/dev/null) )
|
-g -- $group 2>/dev/null) )
|
||||||
else
|
else
|
||||||
COMPREPLY=( $( compgen -S '\:' -u $cur ) )
|
COMPREPLY=( $( compgen -S ':' -u $cur ) )
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
_filedir
|
||||||
fi
|
fi
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
complete -F _chown $default chown
|
complete -F _chown $filenames chown
|
||||||
|
|
||||||
# chgrp(1) completion
|
# chgrp(1) completion
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user