Skip to content

Commit

Permalink
zsh: slice before changing IFS
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Jan 1, 2025
1 parent 62448c7 commit bc37651
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/shell/zsh/snippet.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
func Snippet(cmd *cobra.Command) string {
return fmt.Sprintf(`#compdef %v
function _%v_completion {
local IFS=$'\n'
local words=${words[@]:0:$CURRENT}
local IFS=$'\n'
# shellcheck disable=SC2086,SC2154,SC2155
if echo ${words}"''" | xargs echo 2>/dev/null > /dev/null; then
Expand Down

0 comments on commit bc37651

Please sign in to comment.