-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
nom-build: zsh bridge does not work #2375
Comments
Yeah possibly. Haven't gone too deeply into that edge case. Apart from that carapace uses a custom config at There's a custom completer for # yaml-language-server: $schema=https://carapace.sh/schemas/command.json
name: nom-build
parsing: disabled
completion:
positionalany: ["$carapace.bridge.CarapaceBin([nix-build])"] |
Oh so that's what the carapace bridge is for; it struck me as kind of odd. |
Sourcing the users |
Ah, sorry I forgot to reply to that part; this is indeed a system-wide completion. It's not at the usual path as I'm on NixOS but the default system zsh is made to discover it just fine. |
@rsteube For me, my fpath=(/run/current-system/sw/share/zsh/site-functions $fpath)
autoload -U compinit && compinit |
The amount shown in Is this just related to a specific completer, or a general issue with the zsh bridge? |
@rsteube All commands specified in Just curious about how to specify a default bridge without manually adding stuffs to |
CARAPACE_BRIDGES does exactly that. |
Woah, the first one is nasty - gotta fix that. Does the second still work if you comment out |
@rsteube no, the completion file PS. If I remove My carapace version is |
Does |
That pretty much confirms what i meant above. zsh --no-rcs -c 'printf "%s\n" $fpath' So the path containing the I just need to source the
|
@rsteube I see, so you're going to make For now, |
Pretty much, unless you extend your |
I'll check but I'll have to rebuild this setup again. |
Ah sorry, I forgot to write the important bit: carapace --clear-cache
source <(carapace _carapace) The list of available completers is cached at If it still doesn't work please share your |
@rsteube Works perfectly, thanks for the quick fix! |
For anyone stumbling upon this. { pkgs, ... }: {
programs.zsh.envExtra = ''
export CARAPACE_BRIDGES="zsh"
export CARAPACE_EXCLUDES="nix"
'';
programs.carapace = {
enable = true;
enableZshIntegration = true;
};
xdg.configFile = let
onChange = ''
${pkgs.carapace}/bin/carapace --clear-cache
'';
in {
"carapace/bridges.yaml" = {
inherit onChange;
text = ''
# yaml-language-server: $schema=https://carapace.sh/schemas/command.json
name: nix
description: nix build tool
parsing: disabled
completion:
positionalany: ["$carapace.bridge.Zsh([nix])"]
'';
};
};
} |
Current Behavior
Attempting to complete
nom-build
which ships a zsh-completion inCARAPACE_BRIDGES=zsh nu
does not work:NO RECORDS FOUND
.Perhaps this is to do with the completion being equal to some other completion?
Expected Behavior
It should do zsh
nix-build
completions fornom-build
.Steps To Reproduce
CARAPACE_BRIDGES=zsh nu
nom-build <TAB>
Version
1.0.2
OS
Shell
Anything else?
Nom basically declares itself as an alias. That may be the reason?
Related to this: Should carapace attempt to use its own completions for the command aliased by the bridge or should it use the bridge's aliased command via the bridge too?
Least surprise would probably be to use the aliased command completion via the bridge as command aliases should be handled by carapace itself for native completions.
The text was updated successfully, but these errors were encountered: