- _command(): back out change from 1.265, as we can't reliably avoid expansion
of wildcards prior to handing off for subcompletion. Also, back out change from 1.242 (release 20020402) that set the command line token pointer to be n-1 after expansion of any wildcards. We can't reliably know what the position of the current token is after expansion, since someone may do something like 'sudo ls fo*<Tab> bar', where 'fo*' expands to multiple tokens.
This commit is contained in:
parent
af6559deff
commit
1416f38e22
@ -1,6 +1,6 @@
|
||||
# bash_completion - some programmable completion functions for bash 2.05a
|
||||
#
|
||||
# $Id: bash_completion,v 1.265 2002/04/12 00:24:08 ianmacd Exp $
|
||||
# $Id: bash_completion,v 1.266 2002/04/13 19:21:42 ianmacd Exp $
|
||||
#
|
||||
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
||||
#
|
||||
@ -1826,7 +1826,7 @@ _command()
|
||||
# get current command line minus initial command
|
||||
cline="${COMP_LINE#$1 }"
|
||||
# split current command line tokens into array
|
||||
COMP_WORDS=( "$cline" )
|
||||
COMP_WORDS=( $cline )
|
||||
$func $cline
|
||||
# remove any \: generated by a command that doesn't
|
||||
# default to filenames or dirnames (e.g. sudo chown)
|
||||
|
Loading…
x
Reference in New Issue
Block a user