Skip to content

Commit fea3301

Browse files
committed
fix(zsh): use full word in mr fzf-tab preview for nested tasks
The previous '${word%:*}' stripped trailing ':description' added by _describe, but also chopped 'nix:dead-path' down to 'nix', breaking the preview for nested tasks. With compadd -ld the candidate is already the bare task name, so pass it through unchanged.
1 parent 9e3c93e commit fea3301

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

conf.d/zsh/completion.zsh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ zstyle ':fzf-tab:complete:*:*' fzf-preview \
6767

6868
# mr (mise run) preview
6969
zstyle ':fzf-tab:complete:mr:*' fzf-preview \
70-
'if mise tasks ls --no-header 2>/dev/null | awk "{print \$1}" | grep -qx "${word%:*}"; then
71-
mise tasks info "${word%:*}"
70+
'if mise tasks ls --no-header 2>/dev/null | awk "{print \$1}" | grep -qx "$word"; then
71+
mise tasks info "$word"
7272
else
73-
mise shell-alias ls 2>/dev/null | awk -v n="${word%:*}" "\$1==n {for(i=2;i<=NF;i++) printf \"%s \",\$i; print \"\"}"
73+
mise shell-alias ls 2>/dev/null | awk -v n="$word" "\$1==n {for(i=2;i<=NF;i++) printf \"%s \",\$i; print \"\"}"
7474
fi'
7575

7676
# carapace config

0 commit comments

Comments
 (0)