mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 07:49:11 +03:00
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:
parent
dd1a68daaa
commit
fdb3859999
@ -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}')
|
||||
|
Loading…
Reference in New Issue
Block a user