46 Commits

Author SHA1 Message Date
ianmacd
e961f14f55 fixed _cd() so that if $CDPATH is set and no completions are returned
relative to its paths, we still attempt directory completion relative to $PWD
2002-01-05 19:48:59 +00:00
ianmacd
5dfe16ea34 make gv also complete on encapsulated PostScript files
add jadetex and pdfjadetex to commands that complete on tex files
improved tar completion to handle .tgz and .tar files
inproved tar completion to perform file completion when c*f is the first
  parameter
2002-01-05 19:42:41 +00:00
ianmacd
535803534b add 'conflicts' and 'obsoletes' query completions to _rpm() 2002-01-04 18:29:18 +00:00
ianmacd
7d8abf3421 make gv also complete on PDF files
include --repackage for rpm -[ei]
fix _cd so that it completes on directories with an embedded space
fix _file_and_dir so that it completes on directories with an embedded space
2002-01-04 04:34:21 +00:00
ianmacd
d1d0566a3c no group completion for chgrp, since we ideally also want filename completion
on second and subsequent parameters
2002-01-03 00:17:44 +00:00
ianmacd
450ab1e5e3 add group completion for chgrp
change embedded tabs in the file to $'\t' syntax
be a bit more elegant in determining location of showmount in _mount()
condense awk|grep combo in _configure() to a single sed command
be more intelligent about parsing for exclusion (-X) compspecs when
  binding commands to _file_and_dir()
2002-01-03 00:16:41 +00:00
ianmacd
15dbef4c03 check for showmount in /sbin or /usr/sbin in _mount() 2001-12-21 07:56:18 +00:00
ianmacd
4c07498187 add a compspec for mpg123
condense grep | head into a single sed command in _file_and_dir
2001-12-20 18:26:49 +00:00
ianmacd
1aa894b7dd avoid use of extra file descriptor and grep in _file_and_dir by using
parameter substitutions
2001-12-20 16:12:44 +00:00
ianmacd
2c4236d117 added _file_and_dir as a meta-function for compspecs requiring the -X flag
This allows us to exclude files without excluding directories
use IFS=$'\t' instead of IFS=$(echo -e "\t")
2001-12-20 07:52:12 +00:00
ianmacd
22478325d7 replace spaces with tabs 2001-12-18 03:43:25 +00:00
ianmacd
e5d7d1995f basic nslookup completion added 2001-12-18 03:25:04 +00:00
ianmacd
0cc14422d4 make ee and xv complete on more file-types 2001-12-13 20:34:17 +00:00
ianmacd
1853c7441a ant completion added 2001-12-11 20:25:53 +00:00
ianmacd
ed932a0949 use type (built-in) instead of which (external) to determine whether a
particular command is available
2001-12-05 17:05:49 +00:00
ianmacd
56c3be7ce0 - removed misleading comment on _man completion
- use -g, not -u for group completion (duh!)
- avoid unnecessary use of $COMPREPLY_SAVE in _ssh/_scp
- use '-' as prefix (-P) to kill, not '%', and put it *before* command
- default to filename completion on _scp
- removed a couple of definitions of $prev that weren't actually used
- source ~/.bash_completion if it exists
2001-12-05 16:32:24 +00:00
ianmacd
717b5e5bdd removed _gid_function and made other modifications to account for the fact
that group completion is now standard in bash 2.05a
2001-11-29 00:37:54 +00:00
ianmacd
3b4c23a0d2 make _known_hosts() escape meta-characters in paths before handing off to awk
added missing ` in _service
2001-11-26 18:19:59 +00:00
ianmacd
a5c9861856 $prev not needed in _scp 2001-11-20 20:35:19 +00:00
ianmacd
fffa610ef8 - default to _dirnames on _find
- fixed bug in _known_hosts that caused keys to be printed from known_hosts2
  files
- made _ssh a little more intelligent
- added _scp
- made _cd expand ~ in directory specs
- declared i as a local variable in many functions
2001-11-20 04:15:48 +00:00
ianmacd
4253e056d8 _rpm now uses /var/log/rpmpkgs if available (in RHL 7.2), since this is much
faster than rpm -qa, at the expense of actuality
_man completion now looks at section 'l' (local) of the manual
2001-11-04 23:11:48 +00:00
ianmacd
9c4807523e fixed bug in _cd that caused no completions to be returned if CDPATH was not
set and user was not trying to complete on an absolute path
2001-09-21 18:51:30 +00:00
ianmacd
bc4dc3b582 reverted to previous version of _rpm, since last time's fixes broke more things than
they fixed.
2001-08-22 15:20:27 +00:00
ianmacd
c29fd79ff3 added _command completion function and extended Perforce completion, both written by
Frank Cusack (frank@google.com)
2001-08-16 15:49:39 +00:00
ianmacd
47bb2a571e made rpm completion work when -p option to check uninstalled packages is not concatenated
with other options (e.g. -ql -p instead of -qlp)
2001-08-16 15:27:02 +00:00
ianmacd
c7f06a5a32 tune cd completion for standard dir completion when all else fails
p4 completion completes on files after first parameter
p4 completion now gives default completion if all else fails
2001-07-12 03:52:25 +00:00
ianmacd
86ef94f9b5 corrected bug in have() support function - it returned false positives
umount, rmmod, find, rpm, apt-get, apt-cache, make use '-o filenames'
mount uses '-o default' to get default completion if all else fails
added basic perforce completion
2001-07-09 00:55:01 +00:00
ianmacd
1912863abb added have() function for checking for presence of binaries
check for binaries before installing functions and completions
use '-o' option to 'complete' for optimal completion behaviour
basic tar(1), iptables(8), tcpdump(8) completion added
2001-07-08 23:14:13 +00:00
ianmacd
1dd43836d5 various clean-ups for bash 2.05 ('complete -o' means we can simplify a
bunch of default code)
_cd function made active again
meta default completion function removed (bash 2.05 has 'complete -o default')
2001-05-21 20:10:29 +00:00
ianmacd
071b439db8 fixed typo in rpm completion 2001-03-21 23:33:02 +00:00
ianmacd
dc2eca6004 don't try to do NFS mount completion if we don't seem to have showmount
fix quoting issue in insmod completion
add --specfile, --what{provides,requires} sections to RPM completion
move -*g) case glob down to end of case, to avoid catching --checksig in RPM
  completion
check /etc/known_hosts2 & ~/.ssh/known_hosts2 for hosts in _known_hosts
  completion
fixed typo in service completion
added preliminary _cd meta-function
added some more meta-functions from sample completions supplied with bash 2.04
  source
2001-03-05 19:12:48 +00:00
ianmacd
c27036067e modprobe -r now completes a la insmod
insmod/modprobe now complete on filenames if parameter contains a /
2001-01-31 22:57:06 +00:00
ianmacd
b9b7d9675d insmod completion was not completing module parameters correctly
man completion now resorts to filename completion if no /etc/man.config
2001-01-31 22:30:49 +00:00
ianmacd
8cb465d393 added Red Hat service completion 2001-01-10 23:09:48 +00:00
ianmacd
af9b519c77 added --rmsource as stand-alone option to RPM completion 2000-12-20 02:04:54 +00:00
ianmacd
99f016528f fixed bug in killall completion that caused swapped out processes to not be
completed
added file_glob() function to rpm completion
2000-12-19 19:54:49 +00:00
ianmacd
ab80ab8acb rpm completion updated for extra options in rpm 4.x (added --eval, --pipe,
--rcfile, etc.)
some minor bug fixes to rpm completion; code tidied in places
added some outstanding long options to rpm completion (--install, --freshen,
  --upgrade, --info, --list, --state, --docfiles, --queryformat, --verify  etc.)
added -g group completion
2000-11-20 20:41:43 +00:00
ianmacd
b1513938c3 fixed RPM completion. Not all RPMs were found when completing -e, etc. 2000-10-29 22:17:19 +00:00
ianmacd
be23dd6072 reverted cd, mkdir & pushd to standard -d directory completion 2000-10-19 15:25:36 +00:00
ianmacd
e8d1508ce5 default to filename completion if all else fails on _mound() and _find()
do filename completion in _man() if parameter contains a /
add filename completion to list of _man completions if no manual section
  specified
added functionality to FreeS/WAN IPSec completion
added Debian apt-get & apt-cache completion
added more intelligent directory completion in new _directory function
2000-10-09 18:07:50 +00:00
ianmacd
4940278ca3 added Makefile completion
split _ssh function up into a _known_hosts function for use by other commands
improved insmod completion with module paramter completion
2000-09-25 21:38:11 +00:00
ianmacd
b105887fee fixed bug in man completion that caused pages with a dot in them
(e.g. lilo.conf) not to be found
ssh completion enhanced with command completion after host has been given
fixed bug in ssh completion that caused bad completions when completing on
  a digit
added route(8) completion
2000-09-11 18:46:39 +00:00
ianmacd
b83e93366a fixed bug in killall completion (processes with a path were not completed)
added cipher completion to -c option of ssh
2000-08-29 19:21:00 +00:00
ianmacd
607c618f8e added ssh completion
cleaned the code in some of the other functions
2000-08-29 00:41:27 +00:00
ianmacd
a1c38f0261 added cvs, rpm, chkconfig and chsh completion 2000-08-11 21:20:41 +00:00
ianmacd
49e7b95781 initial check-in of bash 2.04 programmable completion stuff 2000-08-08 22:17:29 +00:00