Merge pull request #690 from syohex/syohex/node-prof-process-completion

Complete only .log file if --prof-process is specified
This commit is contained in:
Shohei YOSHIDA 2020-03-22 10:05:06 +09:00 committed by GitHub
commit 10a79ec71a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -37,10 +37,18 @@
# * Mario Fernandez (https://github.com/sirech) # * Mario Fernandez (https://github.com/sirech)
# * Nicholas Penree (https://github.com/drudge) # * Nicholas Penree (https://github.com/drudge)
# * Masafumi Koba (https://github.com/ybiquitous) # * Masafumi Koba (https://github.com/ybiquitous)
# * Shohei YOSHIDA (https://github.com/syohex)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_node_files() { _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)" _files -g "*.(js|mjs)"
} }