How to load completions #76
-
How does one go about loading custom completions with znap?
I can see the zsh-completions/src folder with the completion files has been cloned and added to fpath, but none of the functions are actually loaded and none of the completions work.
If I instead swap out the zshrc for this:
completions work as expected.
Trying to call the compinit functions before / after sourcing znap doesn't seem to help. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
It works fine for me. Here's what I did: % cd $(mktemp -d); exec env -i PS1='%# ' HOME=$PWD TERM=$TERM zsh -f
% git clone --depth 1 -- https://github.com/marlonrichert/zsh-snap.git; source zsh-snap/install.zsh
Cloning into 'zsh-snap'...
remote: Enumerating objects: 42, done.
remote: Counting objects: 100% (42/42), done.
remote: Compressing objects: 100% (39/39), done.
remote: Total 42 (delta 0), reused 10 (delta 0), pack-reused 0
Receiving objects: 100% (42/42), 18.37 KiB | 6.12 MiB/s, done.
Configuring Znap...
Where do you (want to) keep your repos and/or plugins?
> ~/Git
No such dir ~/Git. Create? [yn] y
Move Znapʼs own repo to ~/Git, too? [yn] y
Updating ~/.zshrc...
Installation complete.
Validating dotfiles...
Restarting Zsh...
% print 'znap source zsh-users/zsh-completions\nPS1="%# "' >> .zshrc
% znap restart
Validating dotfiles...
Restarting Zsh...
Cloning into 'zsh-completions'...
remote: Enumerating objects: 156, done.
remote: Counting objects: 100% (156/156), done.
remote: Compressing objects: 100% (151/151), done.
remote: Total 156 (delta 47), reused 38 (delta 3), pack-reused 0
Receiving objects: 100% (156/156), 346.18 KiB | 786.00 KiB/s, done.
Resolving deltas: 100% (47/47), done.
% sbt <TAB>
clean -- delete files produced by the build
compile -- compile sources
console -- start the Scala REPL with project classes on the classpath
console-project -- start the Scala REPL w/sbt+build-def on the classpath
console-quick -- start the Scala REPL with project deps on the classpath
dist -- generate distribution artifacts
dist:clean -- clean distribution artifacts
doc -- generate API documentation
gen-idea -- generate Intellij Idea project files
package -- produce the main artifact, such as a binary jar
package-doc -- produce a doc artifact, such as a jar containing API docs
package-src -- produce a source artifact, such as a jar containing sources
publish -- publish artifacts to a repository
publish-local -- publish artifacts to the local repository
run -- run a main class
run-main -- run the main class selected by the first argument
test -- execute all tests
test-only -- execute the tests provided as arguments
test-quick -- execute previously failed tests
update -- resolve and optionally retrieve dependencies Can you please try the steps above and let me know if they work for you? |
Beta Was this translation helpful? Give feedback.
-
Copying here as an answer: It's these lines in /etc/zsh/zshrc on ubuntu & friends (at least in version 20.10):
Adding |
Beta Was this translation helpful? Give feedback.
Copying here as an answer:
It's these lines in /etc/zsh/zshrc on ubuntu & friends (at least in version 20.10):
Adding
skip_global_compinit=1
to ~/.zshenv fixed the problem on both my Pop! OS and Ubuntu machines.