aboutsummaryrefslogtreecommitdiffstats
path: root/src/_node
diff options
context:
space:
mode:
authorShohei YOSHIDA <syohex@gmail.com>2020-03-22 10:05:06 +0900
committerGitHub <noreply@github.com>2020-03-22 10:05:06 +0900
commit10a79ec71a2bb124c22faf1d6651fb9a9f3ac2b1 (patch)
treed33d083f9ebc24aea1a0a8242972db048fd28681 /src/_node
parentMerge pull request #676 from pseyfert/cmake_unity (diff)
parentComplete only .log file if --prof-process is specified (diff)
downloadzsh-completions-10a79ec71a2bb124c22faf1d6651fb9a9f3ac2b1.tar
zsh-completions-10a79ec71a2bb124c22faf1d6651fb9a9f3ac2b1.tar.gz
zsh-completions-10a79ec71a2bb124c22faf1d6651fb9a9f3ac2b1.tar.bz2
zsh-completions-10a79ec71a2bb124c22faf1d6651fb9a9f3ac2b1.tar.lz
zsh-completions-10a79ec71a2bb124c22faf1d6651fb9a9f3ac2b1.tar.xz
zsh-completions-10a79ec71a2bb124c22faf1d6651fb9a9f3ac2b1.tar.zst
zsh-completions-10a79ec71a2bb124c22faf1d6651fb9a9f3ac2b1.zip
Merge pull request #690 from syohex/syohex/node-prof-process-completion
Complete only .log file if --prof-process is specified
Diffstat (limited to 'src/_node')
-rw-r--r--src/_node8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/_node b/src/_node
index 36c58ff..fc6f366 100644
--- a/src/_node
+++ b/src/_node
@@ -37,10 +37,18 @@
# * Mario Fernandez (https://github.com/sirech)
# * Nicholas Penree (https://github.com/drudge)
# * Masafumi Koba (https://github.com/ybiquitous)
+# * Shohei YOSHIDA (https://github.com/syohex)
#
# ------------------------------------------------------------------------------
_node_files() {
+ for (( i = 2; i < CURRENT; i++)); do
+ if [[ ${words[i]} == "--prof-process" ]]; then
+ _files -g "*.log"
+ return
+ fi
+ done
+
_files -g "*.(js|mjs)"
}