-
Notifications
You must be signed in to change notification settings - Fork 178
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
shell completion issues (zsh & fish) #359
Comments
Having the same issue with fish shell on MacOS. > yadm --version && fish --version && uname -a
yadm 3.1.0
fish, version 3.3.1
Darwin my-mbpro.local 20.5.0 Darwin Kernel Version 20.5.0: Sat May 8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64 x86_64 |
Same problem on yadm 3.1.0, fish 3.3.1, Linux |
Same problem |
Is there really no fix or workaround in sight for this? I read through two closed issues in the fish repo to try and find a hint for a solution. One of the main fish developers (@faho) seems to basically say that tab completion to be very slow is to be expected when using I tried multiple variations of a Also I just tried, and the path completion works just fine with bash. |
yeah, I still have the same issue. I did manage to speed it up significantly by putting almost everything in ~/.gitignore though:
|
how about this work around? For me when I want to # ~/.zshrc
function _yadm-add(){ _ls } Edit: with a bit more trickery we could have the best of both worlds. function _yadm-add(){
yadm_path="$(yadm rev-parse --show-toplevel)"
yadm_options=$(yadm status --porcelain=v1 |
awk -v yadm_path=${yadm_path} '{printf "%s/\"%s\"\\:\"%s\" ", yadm_path, $2, $1 }' )
_alternative \
"args:custom arg:(($yadm_options))" \
'files:filename:_files'
}
(anything better to do the formatting than awk?) 2021-12-20.14.13.46.mp4 |
Same problem with |
Same on However on fish there is a workaround to only use Ctrl+F to complete, which is a built-in functionality of the fish shell. |
To move this along I made a pull request #417 |
I can confirm that Fish tab completion is still broken in 3.2.2. |
@TheLocehiliosan I somehow missed your comment, just happened to see it now.
Is there any other information I can provide that would be helpful? |
Bump on this — love yadm (3.1.1) but tab completion hangs with fish (3.3.1) is a big deal when adding previously untracked files. |
This appears to be an issue with the git completions bundles inside fish and not an issue with yadm. You can see this behaviour by creating a new repo in your home with |
I fixed this in zsh for yadm by just overwriting the default completions and putting in completion based on yadm status and I'm sure we can just copy a fish equivalent function over |
The autocomplete for the git commands in fish come from telling I tried adding my own autocomplete for |
This is what I have so far function __fish_yadm_status_options
# set -l fish_trace on
set -l yadm_path (yadm rev-parse --show-toplevel)
set -l yadm_status (yadm status --porcelain=v1 | awk '{print $2}')
set -l yadm_options (echo "$yadm_status" | awk -v yadm_path="$yadm_path" '{printf "%s/%s%s\n", yadm_path, $2, $1}' )
echo $yadm_options
end
complete -e yadm --wraps 'git --git-dir=/home/joshua/.local/share/yadm/repo.git'
complete -c yadm -n "__fish_seen_subcommand_from add" -a "(__fish_yadm_status_options)"
complete -c yadm -n "__fish_seen_subcommand_from add" -F
complete -c yadm -n "__fish_seen_subcommand_from checkout" -a "(__fish_yadm_status_options)"
complete -c yadm -n "__fish_seen_subcommand_from checkout" -F The part I haven't fixed yet is that when applied I think the solution would be to wrap git completions for specific command and not everything. Put into I don't think |
Thanks for looking into this @joshzcold. It looks like we got to the same point in deciding that it wasn't possible to wrap a command but overwrite just some of the completions. I have posted on the Fish Shell mailing list to ask if there is the ability to do this currently. Hopefully someone who knows more about Fish completions can provide some help from there. |
A slight workaround I do for You can also do |
This bug is ridiculously annoying. It freezes my terminal for 20sec :( |
If this happens you can interrupt the completion process with 'Ctrl-c'. |
when typing
yadm add <tab>
files are never listed, and my shell seems to hang. This may be related to #292 but I don't know.The text was updated successfully, but these errors were encountered: