about summary refs log tree commit diff
path: root/Completion/Unix
diff options
context:
space:
mode:
authorJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2023-09-04 15:07:52 +0900
committerJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2023-09-04 15:07:52 +0900
commitc0caef561323b91ea0c4aa101b564f92ab51b68d (patch)
tree5caa79c3bfb53add8f14e49333b456f76bdeded3 /Completion/Unix
parent9ff1b2810e70658b2364b737478e9a996de0a644 (diff)
downloadzsh-c0caef561323b91ea0c4aa101b564f92ab51b68d.tar.gz
zsh-c0caef561323b91ea0c4aa101b564f92ab51b68d.tar.xz
zsh-c0caef561323b91ea0c4aa101b564f92ab51b68d.zip
52112: use '_normal -p subcmd' to complete only external command
Diffstat (limited to 'Completion/Unix')
-rw-r--r--Completion/Unix/Command/_chroot2
-rw-r--r--Completion/Unix/Command/_mosh4
-rw-r--r--Completion/Unix/Command/_route2
-rw-r--r--Completion/Unix/Command/_screen2
-rw-r--r--Completion/Unix/Command/_script2
-rw-r--r--Completion/Unix/Command/_ssh4
-rw-r--r--Completion/Unix/Command/_stdbuf2
-rw-r--r--Completion/Unix/Command/_timeout2
8 files changed, 10 insertions, 10 deletions
diff --git a/Completion/Unix/Command/_chroot b/Completion/Unix/Command/_chroot
index 516992694..a9c577bd7 100644
--- a/Completion/Unix/Command/_chroot
+++ b/Completion/Unix/Command/_chroot
@@ -33,7 +33,7 @@ case $variant in
     ;;
 esac
 
-args+=( '1:new root directory:_directories' '*:::command:_normal' )
+args+=( '1:new root directory:_directories' '*::: : _normal -p $service' )
 
 _arguments -s -S : $args && ret=0
 
diff --git a/Completion/Unix/Command/_mosh b/Completion/Unix/Command/_mosh
index 7d1250320..6d0f746f8 100644
--- a/Completion/Unix/Command/_mosh
+++ b/Completion/Unix/Command/_mosh
@@ -7,7 +7,7 @@ _arguments -C \
   '(-)--help[display help information]' \
   '(-)--version[display version information]' \
   "--no-init[don't set terminal init string]" \
-  '--ssh=[specify ssh command to setup session]:ssh command:_normal' \
+  '--ssh=[specify ssh command to setup session]:ssh command: _cmdstring' \
   '--port=[specify server-side port range]:port:_sequence -n 2 -s \: _ports' \
   '(-a -n)--predict=[control speculative local echo]:mode:(adaptive always never)' \
   '(--predict -n)-a[synonym for --predict=always]' \
@@ -22,7 +22,7 @@ _arguments -C \
   '--local[run mosh-server locally without using ssh]' \
   '--experimental-remote-ip=[select method for discovering remote IP address to use for mosh]:method:(local remote proxy)' \
   '1:remote host name:->userhost' \
-  '*:::args:_normal' && ret=0
+  '*::: : _normal -p $service' && ret=0
 
 case $state in
   userhost)
diff --git a/Completion/Unix/Command/_route b/Completion/Unix/Command/_route
index 95df6d936..f0775a5d2 100644
--- a/Completion/Unix/Command/_route
+++ b/Completion/Unix/Command/_route
@@ -196,7 +196,7 @@ if [[ -n $state ]]; then
   if [[ $line[1] = exec ]]; then
     shift words
     (( CURRENT-- ))
-    _normal
+    _normal -p $service && return
   elif [[ $line[1] = (flush|monitor) ]]; then
     sequential=()
   fi
diff --git a/Completion/Unix/Command/_screen b/Completion/Unix/Command/_screen
index 6d47d2638..9336ae82d 100644
--- a/Completion/Unix/Command/_screen
+++ b/Completion/Unix/Command/_screen
@@ -107,7 +107,7 @@ if [[ -n $state ]]; then
       elif (( CURRENT > 2 )) && [[ ${words[1]} == /dev/* ]]; then
 	  _message "no more parameters"
       else
-	  _normal
+	  _normal -p $service
       fi
     ;;
     attached-sessions)
diff --git a/Completion/Unix/Command/_script b/Completion/Unix/Command/_script
index 7a3960be0..f39cfe535 100644
--- a/Completion/Unix/Command/_script
+++ b/Completion/Unix/Command/_script
@@ -68,7 +68,7 @@ case $OSTYPE in
       '-F[send output to specified named pipe]:fifo:_files -g "*(p)"'
       '-t+[specify interval of data flushing]:interval (seconds)'
       '-k[log keys sent to the program as well as output]'
-      '*:::arguments: _normal'
+      '*:::arguments: _normal $service'
     )
   ;|
   darwin*|freebsd*)
diff --git a/Completion/Unix/Command/_ssh b/Completion/Unix/Command/_ssh
index fd2a90b59..0ba1f3775 100644
--- a/Completion/Unix/Command/_ssh
+++ b/Completion/Unix/Command/_ssh
@@ -136,7 +136,7 @@ _ssh () {
       '(-k -c)-s[force sh-style shell]' \
       '-t+[set default maximum lifetime for identities]: :_numbers -u seconds "maximum lifetime" \:s\:seconds m\:minutes h\:hours d\:days w\:weeks' \
       '-v[verbose mode]' \
-      '*::command: _normal'
+      '*::command: _normal -p $service'
     return
     ;;
   ssh-keygen)
@@ -738,7 +738,7 @@ _ssh () {
       local -a _comp_priv_prefix
       shift 1 words
       (( CURRENT-- ))
-      _normal
+      _normal -p $service
       return
       ;;
     destinations)
diff --git a/Completion/Unix/Command/_stdbuf b/Completion/Unix/Command/_stdbuf
index 4b7d98ba0..32b3cae2f 100644
--- a/Completion/Unix/Command/_stdbuf
+++ b/Completion/Unix/Command/_stdbuf
@@ -27,6 +27,6 @@ for ((i=1;i<=3;i++)); do
     "(${short[i]})${long[i]}=${(e)opt}"
   )
 done
-(( CURRENT > 2 )) && args+=( '*::command:_normal' )
+(( CURRENT > 2 )) && args+=( '*::command: _normal -p $service' )
 
 _arguments -s -S $args
diff --git a/Completion/Unix/Command/_timeout b/Completion/Unix/Command/_timeout
index c041283ac..9c7f1a004 100644
--- a/Completion/Unix/Command/_timeout
+++ b/Completion/Unix/Command/_timeout
@@ -17,4 +17,4 @@ _arguments -S -A "-" $args \
   '(-s --signal)'{-s,--signal}'[specify the signal to send on timeout]:signal:_signals' \
   '(-k --kill-after)'{-k,--kill-after}'[followup first signal with SIGKILL if command persists after specified time]:time' \
   '1: :_numbers -f -u seconds duration :s:seconds m:minutes h:hours d:days' \
-  '*:::command:_normal'
+  '*:::command: _normal -p $service'