Skip to content

Commit

Permalink
Use parameter expansion
Browse files Browse the repository at this point in the history
  • Loading branch information
hexium310 committed Nov 19, 2024
1 parent ddd3500 commit 7f4ee93
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/core/parser.zsh
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
#!/usr/bin/env zsh

_fzf_complete_get_command_pos() {
local cmd
local arguments=("${(Q)${(z)@}[@]}")

if [[ -n $cmd_word ]]; then
cmd=$cmd_word
else
cmd=$(__fzf_extract_command "$@")
fi
local cmd=${cmd_word-$(__fzf_extract_command "$@")}

echo ${arguments[(i)$cmd]}
}
Expand Down

0 comments on commit 7f4ee93

Please sign in to comment.