From: "Jun T." <takimoto-j@kba.biglobe.ne.jp>
To: zsh-workers@zsh.org
Subject: [PATCH] _lldb: complete process name for option -n
Date: Wed, 18 Jul 2018 02:09:48 +0900 [thread overview]
Message-ID: <D8B33C2A-C9F1-443E-BE75-11ED68F9255A@kba.biglobe.ne.jp> (raw)
Use _process_names for -n/--attach-name.
diff --git a/Completion/Unix/Command/_lldb b/Completion/Unix/Command/_lldb
index 16e346cfb..0426f69f2 100644
--- a/Completion/Unix/Command/_lldb
+++ b/Completion/Unix/Command/_lldb
@@ -2,7 +2,8 @@
local curcontext=$curcontext state state_descr line expl ret=1
typeset -A opt_args
-local -a args
+typeset -a opts args
+[[ $EUID = 0 || $_comp_priv_prefix[1] = sudo ]] && opts=( -a )
args=(
'*'{-o+,--one-line=}'[run one-line lldb command after loading executable]:lldb command: '
@@ -29,7 +30,7 @@ args=(
'(-c --core)'{-c+,--core=}'[specify core file to open]:core file:_files -g "*core*(-.)"'
'*::executable and arguments:->exe_args'
- name
- '(-n --attach-name)'{-n+,--attach-name=}'[attach to the named process]:process name'
+ '(-n --attach-name)'{-n+,--attach-name=}"[attach to the named process]: :_process_names $opts"
'(-w --wait-for)'{-w,--wait-for}'[wait for the specified process to launch]'
- pid
'(-p --attach-pid)'{-p+,--attach-pid=}'[attach to the specified process]:pid:_pids'
reply other threads:[~2018-07-17 17:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D8B33C2A-C9F1-443E-BE75-11ED68F9255A@kba.biglobe.ne.jp \
--to=takimoto-j@kba.biglobe.ne.jp \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).