- minor fix to _command() to allow leading whitespace on the command line
This commit is contained in:
parent
7f9d6fb90b
commit
7efc2181e6
@ -1,6 +1,6 @@
|
||||
# bash_completion - some programmable completion functions for bash 2.05b
|
||||
#
|
||||
# $Id: bash_completion,v 1.705 2004/05/20 06:40:59 ianmacd Exp $
|
||||
# $Id: bash_completion,v 1.706 2004/05/24 08:28:20 ianmacd Exp $
|
||||
#
|
||||
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
||||
#
|
||||
@ -2754,9 +2754,9 @@ _command()
|
||||
func=${cspec#*-F }
|
||||
func=${func%% *}
|
||||
# get current command line minus initial command
|
||||
cline="${COMP_LINE#$1 }"
|
||||
cline="${COMP_LINE#*( )$1 }"
|
||||
# save noglob state
|
||||
shopt -o noglob >/dev/null; noglob=$?
|
||||
shopt -qo noglob; noglob=$?
|
||||
# turn on noglob, as things like 'sudo ls *<Tab>'
|
||||
# don't work otherwise
|
||||
shopt -so noglob
|
||||
|
Loading…
x
Reference in New Issue
Block a user