mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 07:49:11 +03:00
bash_completion: change --rev if-else block into a case
Again, this doesn't change behavior but does make it easy to add cases in the next patch.
This commit is contained in:
parent
fdb3859999
commit
2c4a9fc383
@ -239,12 +239,16 @@ _hg_command_specific()
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [ "$cmd" != status ] && [ "$prev" = -r ] || [ "$prev" == --rev ]; then
|
||||
if [[ $canonical = 1 || status != "$cmd"* ]]; then
|
||||
_hg_labels
|
||||
return 0
|
||||
fi
|
||||
return 1
|
||||
if [ "$cmd" != status ]; then
|
||||
case "$prev" in
|
||||
-r|--rev)
|
||||
if [[ $canonical = 1 || status != "$cmd"* ]]; then
|
||||
_hg_labels
|
||||
return 0
|
||||
fi
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
local aliascmd=$(_hg_cmd showconfig alias.$cmd | awk '{print $1}')
|
||||
|
Loading…
Reference in New Issue
Block a user