if [[ $prev == -A ]]; then
COMPREPLY=(alias arrayvar binding builtin command directory \
-disabled enabled export file function helptopic hostname job keyword \
+disabled enabled export file 'function' helptopic hostname job keyword \
running setopt shopt signal stopped variable)
return 0
elif [[ $prev == -F ]]; then
esac
# make reads `makefile' before `Makefile'
- if [ -f makefile ]; then
+ # GNU make reads `GNUmakefile' before all other makefiles, but we
+ # check that we're completing `gmake' before checking for it
+ if [ -f GNUmakefile ] && [ ${COMP_WORDS[0]} == gmake ]; then
+ mdef=GNUmakefile
+ elif [ -f makefile ]; then
mdef=makefile
elif [ -f Makefile ]; then
mdef=Makefile
complete -f strip
complete -f -X '*.gz' gzip
+complete -f -X '*.bz2' bzip2
complete -f -X '*.Z' compress
complete -f -X '!*.+(gz|tgz|Gz)' gunzip gzcat zcat zmore
complete -f -X '!*.Z' uncompress zmore zcat
-
-complete -f -X '!*.+(gif|jpg|jpeg|GIF|JPG|bmp)' xv
+complete -f -X '!*.bz2' bunzip2
+complete -f -X '!*.zip' unzip
+complete -f -X '!*.+(gif|jpg|jpeg|GIF|JPG|JPEG|bmp)' xv
complete -f -X '!*.pl' perl perl5
complete -u su
complete -f -X '!*.+(ps|PS)' gs gv ghostview psselect pswrap
-complete -f -X '!*.+(dvi|DVI)' dvips xdvi dviselect dvitype
-complete -f -X '!*.+(pdf|PDF)' acroread
+complete -f -X '!*.+(dvi|DVI)' dvips xdvi dviselect dvitype catdvi
+complete -f -X '!*.+(pdf|PDF)' acroread4
complete -f -X '!*.texi*' makeinfo texi2dvi texi2html
complete -f -X '!*.+(tex|TEX)' tex latex slitex
+complete -f -X '!*.+(mp3|MP3)' mpg123
+complete -f -X '!*.+(htm|html)' links w3m lynx
+
#
# other possibilities, left as exercises
#