bash_completion: simplify if-else logic

There is no change in functionality here but this makes refactoring this later
easier.
This commit is contained in:
Sean Farley 2013-11-26 13:55:33 -06:00
parent dd1a68daaa
commit fdb3859999

View File

@ -240,15 +240,11 @@ _hg_command_specific()
fi
if [ "$cmd" != status ] && [ "$prev" = -r ] || [ "$prev" == --rev ]; then
if [ $canonical = 1 ]; then
if [[ $canonical = 1 || status != "$cmd"* ]]; then
_hg_labels
return 0
elif [[ status != "$cmd"* ]]; then
_hg_labels
return 0
else
return 1
fi
return 1
fi
local aliascmd=$(_hg_cmd showconfig alias.$cmd | awk '{print $1}')