- mc completion by Koblinger Egmont <egmont@uhulinux.hu>

This commit is contained in:
ianmacd 2003-08-18 19:59:05 +00:00
parent 1770346236
commit f20bc30798

View File

@ -1,6 +1,6 @@
# bash_completion - some programmable completion functions for bash 2.05b
#
# $Id: bash_completion,v 1.614 2003/08/18 21:31:45 ianmacd Exp $
# $Id: bash_completion,v 1.615 2003/08/18 21:59:05 ianmacd Exp $
#
# Copyright (C) Ian Macdonald <ian@caliban.org>
#
@ -5188,6 +5188,25 @@ _mkisofs()
}
[ -n "${have:-}" ] && complete -F _mkisofs mkisofs
# mc(1) completion
#
have mc &&
_mc()
{
local cur prev
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD-1]}
if [ "$prev" = "-e" -o "$prev" = "-v" ]; then
_filedir
else
_filedir -d
fi
}
[ "${have:-}" ] && complete -F _mc $filenames mc
_filedir_xspec()
{
local IFS cur xspec