solved qcd -l problem. highbeam string argument rules

This commit is contained in:
ville rantanen
2013-09-04 18:36:26 +03:00
parent 8edde06849
commit e053dd386c
2 changed files with 42 additions and 26 deletions

View File

@@ -44,6 +44,7 @@ have qcd &&
_qcd()
{
local cur
local d
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
if [[ "$cur" == -* ]]; then
@@ -106,11 +107,12 @@ Keeps a history of folders visited in ~/.bash_cdhistory
esac
done
shift $(($OPTIND - 1))
if [ -z "$1" ]
then [[ $OPTIND -gt 1 ]] && return
\cd; return
fi
unset OPTSTRING
unset OPTIND
if [ -z "$1" ]
then \cd; return
fi
if [ "$1" = "-" ]
then \cd -; return
fi