about summary refs log tree commit diff
path: root/Completion/Core/_normal
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Core/_normal')
-rw-r--r--Completion/Core/_normal13
1 files changed, 4 insertions, 9 deletions
diff --git a/Completion/Core/_normal b/Completion/Core/_normal
index c3315610f..1791d2471 100644
--- a/Completion/Core/_normal
+++ b/Completion/Core/_normal
@@ -66,10 +66,7 @@ fi
 name="$cmd1"
 comp="$_comps[$cmd1]"
 
-if [[ -z "$comp" ]]; then
-  name="$cmd2"
-  comp="$_comps[$cmd2]"
-fi
+[[ -z "$comp" ]] && name="$cmd2" comp="$_comps[$cmd2]"
 
 # And generate the matches, probably using default completion.
 
@@ -77,11 +74,9 @@ if [[ -n "$comp" ]]; then
   _compskip=patterns
   "$comp" && ret=0
   [[ "$_compskip" = (all|*patterns*) ]] && return ret
-else
-  if [[ "$_compskip" != *default* ]]; then
-    name=-default-
-    comp="$_comps[-default-]"
-  fi
+elif [[ "$_compskip" != *default* ]]; then
+  name=-default-
+  comp="$_comps[-default-]"
 fi
 
 if [[ "$_compskip" != (all|*patterns*) ]]; then