Avoid some unnecessary commands.
This commit is contained in:
parent
f48d6fb10d
commit
e35eabb791
@ -50,10 +50,10 @@ _ant()
|
||||
# parse buildfile for targets
|
||||
# some versions of sed complain if there's no trailing linefeed,
|
||||
# hence the 2>/dev/null
|
||||
COMPREPLY=( $( compgen -W "$( cat $buildfile | tr "'\t\n>" "\" \n" | \
|
||||
COMPREPLY=( $( compgen -W "$( tr "'\t\n>" "\" \n" < $buildfile | \
|
||||
sed -ne 's/.*<target .*name="\([^"]*\).*/\1/p' 2>/dev/null )" \
|
||||
-- "$cur" ) )
|
||||
fi
|
||||
fi
|
||||
} &&
|
||||
have complete-ant-cmd.pl && \
|
||||
complete -C complete-ant-cmd.pl -F _ant ant || complete -F _ant ant
|
||||
|
@ -50,7 +50,7 @@ _cvs_roots()
|
||||
cvsroots=( $CVSROOT )
|
||||
[ -r ~/.cvspass ] && \
|
||||
cvsroots+=( $( awk '{ print $2 }' ~/.cvspass ) )
|
||||
[ -r CVS/Root ] && cvsroots+=( $( cat CVS/Root ) )
|
||||
[ -r CVS/Root ] && mapfile -tO ${#cvsroots[@]} cvsroots < CVS/Root
|
||||
COMPREPLY=( $( compgen -W '${cvsroots[@]}' -- "$cur" ) )
|
||||
__ltrim_colon_completions "$cur"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user