From b9256a9942a80336047db99ae1178385bb08d94a Mon Sep 17 00:00:00 2001 From: Shohei YOSHIDA Date: Sat, 21 Mar 2020 17:55:50 +0900 Subject: [PATCH] Complete only .log file if --prof-process is specified Fixes: https://github.com/zsh-users/zsh-completions/issues/633 --- src/_node | 8 ++++++++ 1 file changed, 8 insertions(+) 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)" }