bash_completion: simplify if-else logic
There is no change in functionality here but this makes refactoring this later
easier.
--- a/contrib/bash_completion Mon Nov 25 11:38:14 2013 -0500
+++ b/contrib/bash_completion Tue Nov 26 13:55:33 2013 -0600
@@ -240,15 +240,11 @@
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}')