Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aliases no longer produces correct completion #252

Open
chitoku-k opened this issue Dec 28, 2024 · 0 comments
Open

Aliases no longer produces correct completion #252

chitoku-k opened this issue Dec 28, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@chitoku-k
Copy link
Owner

chitoku-k commented Dec 28, 2024

OS version

N/A

zsh version

zsh 5.9 (x86_64-pc-linux-gnu)

awk version

N/A

jq version

N/A

fzf version

0.57.0 (0476a65f)

Command version(s)

N/A

Locale

N/A

Aliases (if applicable)

g='git'

Options

autocd
autopushd
autoresume
combiningchars
correct
extendedglob
noflowcontrol
histignorealldups
histignoredups
ignoreeof
interactive
login
magicequalsubst
monitor
nonomatch
pushdignoredups
shinstdin
zle

Installed zsh plugins (if applicable)

N/A

What happened?

When a command is aliased, its alias form no longer produces the correct completion.

Related: #251

$cmd_word is an aliased command (i.e., g) while the $arguments hold the original input (g checkout) as is.

_fzf_complete_get_command_pos() {
local arguments=("${(Q)${(z)@}[@]}")
local cmd=${cmd_word-$(__fzf_extract_command "$@")}
echo ${arguments[(i)$cmd]}
}

What did you expect to happen?

Completions for aliases should function again.

Steps to reproduce

$ g checkout **<TAB>
@chitoku-k chitoku-k added the bug Something isn't working label Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant