_longopt(): add irb to list of commands

_longopt(): refine sed command that filters long options
This commit is contained in:
ianmacd 2002-02-20 05:26:08 +00:00
parent 705b6b76ff
commit 591939ead3

View File

@ -1,6 +1,6 @@
# bash_completion - some programmable completion functions for bash 2.05a
#
# $Id: bash_completion,v 1.136 2002/02/20 03:56:08 ianmacd Exp $
# $Id: bash_completion,v 1.137 2002/02/20 06:26:08 ianmacd Exp $
#
# Copyright (C) Ian Macdonald <ian@caliban.org>
#
@ -1758,7 +1758,7 @@ _longopt()
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( $1 --help | sed -e '/--/!d' \
-e 's/.*--\([^ ]*\).*/--\1/' | \
-e 's/.*\(--[-A-Za-z0-9]\+=\?\).*/\1/' | \
grep ^$cur | sort -u ) )
else
_filedir
@ -1772,7 +1772,7 @@ for i in a2ps autoconf automake bc gprof ld nm objcopy objdump readelf strip \
touch vdir xargs awk gperf grep gpg grub indent less m4 sed shar date \
env seq su tee uname who texindex cat csplit cut expand fmt fold head \
md5sum nl od paste pr ptx sha1sum sort split tac tail tr unexpand \
uniq wc units wget rsync ldd bash id info; do
uniq wc units wget rsync ldd bash id info irb; do
have $i && complete -F _longopt -o filenames $i
done
unset i