about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2021-04-09 21:51:31 +0200
committerOliver Kiddle <opk@zsh.org>2021-04-09 21:51:31 +0200
commitf3caff1536c4a4061d353314eef2628bcd1c8403 (patch)
tree910af7e4641f3e2fb0eba1389180ee8e8a29b01d /Completion
parent69ffb0bf0aa6c59e3c0529e540f67a26a6cdc541 (diff)
downloadzsh-f3caff1536c4a4061d353314eef2628bcd1c8403.tar.gz
zsh-f3caff1536c4a4061d353314eef2628bcd1c8403.tar.xz
zsh-f3caff1536c4a4061d353314eef2628bcd1c8403.zip
48437: fix pid completion when cursor is in the middle of the line
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Unix/Command/_gdb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Completion/Unix/Command/_gdb b/Completion/Unix/Command/_gdb
index 18f797633..6bdd55946 100644
--- a/Completion/Unix/Command/_gdb
+++ b/Completion/Unix/Command/_gdb
@@ -40,9 +40,9 @@ else
   (-b)     _baudrates && return 0 ;;
   esac
 
-  w=( "${(@)words[2,-1]}" )
+  w=( "${(@)words[2,CURRENT-1]}" )
   while [[ "$w[1]" = -* ]]; do
-    [[ "$w[1]" = -[decsxb] ]] && shift 1 w
+    [[ "$w[1]" = -(cd|se|tty|[decsxb]) ]] && shift 1 w
     shift 1 w
   done