_tar(): prevent error if user tries to complete on first parameter using a
string like -x (compgen sees the -x as an option to itself)
This commit is contained in:
parent
0a9fda5e8c
commit
2ae196062c
@ -1,6 +1,6 @@
|
||||
# bash_completion - some programmable completion functions for bash 2.05a
|
||||
#
|
||||
# $Id: bash_completion,v 1.139 2002/02/20 19:09:45 ianmacd Exp $
|
||||
# $Id: bash_completion,v 1.140 2002/02/21 20:26:36 ianmacd Exp $
|
||||
#
|
||||
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
||||
#
|
||||
@ -1294,6 +1294,8 @@ _tar()
|
||||
COMPREPLY=()
|
||||
cur=${COMP_WORDS[COMP_CWORD]}
|
||||
|
||||
[ $COMP_CWORD -eq 1 ] && return 0
|
||||
|
||||
case "${COMP_WORDS[1]}" in
|
||||
c*f)
|
||||
_filedir
|
||||
|
Loading…
x
Reference in New Issue
Block a user