Bash completetions: a little cleaning up

This commit is contained in:
Doug Blank 2016-05-06 16:02:09 -04:00
parent 6d95cd5dd3
commit a2f40fbf67

View File

@ -10,15 +10,14 @@ _gramps()
return 0
elif [[ ${cur} == --open ]] ; then
local IFS=$'\n'
local names=($( ./Gramps.py -l | grep \" | cut -d\ -f4- ))
local names=($( gramps -l | grep \" | cut -d\ -f4- ))
COMPREPLY=( $(compgen --W "${names[*]}" -- ${cur}) )
return 0
else
local IFS=$'\n'
local names=($( ./Gramps.py -l | grep \" | cut -d\ -f4- ))
local names=($( gramps -l | grep \" | cut -d\ -f4- ))
COMPREPLY=( $(compgen -W "${names[*]}" -- ${cur}) )
return 0
fi
}
complete -F _gramps gramps
complete -F _gramps ./Gramps.py