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

Custom spec files not being loaded #2579

Closed
ulisses-cruz opened this issue Nov 2, 2024 · 3 comments
Closed

Custom spec files not being loaded #2579

ulisses-cruz opened this issue Nov 2, 2024 · 3 comments

Comments

@ulisses-cruz
Copy link

ulisses-cruz commented Nov 2, 2024

I've installed carapace:

brew install carapace

I've added the following lines to my zsh config:

export CARAPACE_BRIDGES='zsh,fish,bash,inshellisense' # optional
zstyle ':completion:*' format $'\e[2;37mCompleting %d\e[m'
source <(carapace _carapace)

And added my custom spec .yaml files to ~/.config/carapace/spec/, but they are not being loaded.

Am I missing something?

@rsteube rsteube transferred this issue from carapace-sh/carapace Nov 2, 2024
@rsteube
Copy link
Member

rsteube commented Nov 2, 2024

  1. check if it is actually the path where they are loaded from carapace -h
Specs are loaded from [.../carapace/specs]
  1. make sure to start a new shell for new specs (or execute source <(carapace _carapace))
  2. the spec filename must match the command
  3. this might also help:
carapace --list --all --format json | jq 'with_entries( select(.value | has("Spec")) )'

@ulisses-cruz
Copy link
Author

  1. check if it is actually the path where they are loaded from carapace -h
Specs are loaded from [.../carapace/specs]

Thanks @rsteube, that was the issue, my installation is loading specs from ~/Library/Application Support/carapace/specs.

Is there an environment variable, or another way to set the carapace config dir to a different place?

@rsteube
Copy link
Member

rsteube commented Nov 3, 2024

Yes, that's the default UserConfigDir on mac (examples in the docs often just show the linux version).
You can set XDG_CONFIG_HOME which carapace acknowledges on all operation systems, but it will likely affect other commands as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants