question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Zsh tab completion not working on Mac

See original GitHub issue

Hi, I’ve installed tab completion script following the commands.

    $ curl https://cheat.sh/:zsh > ~/.zsh.d/_cht
    $ echo 'fpath=(~/.zsh.d/ $fpath)' >> ~/.zshrc
    $ # Open a new shell to load the plugin

However, even if I have ran source ~/.zshrc, when I type cht.sh go/f, the suggestion didn’t show up. Am I missing something? Thanks!

image

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
dmitanacommented, May 12, 2021

_cht execution was only a reaction to @ab-10’s comment.

Yes, after adding compinit tab-completion works flawlessly. I wanted only to confirm your suggestion because there were no reactions from others on whether compinit solved the issue.

Maybe not everyone is aware of compinit, and adding a note that compinit is required to the ZSH Tab completion section in README would be suitable.

0reactions
chubincommented, May 12, 2021

But you are not supposed to execute _cht, you just use it.

I’ve tested it tab-completion with zsh 5.8, and everything perfectly works.

$ cht.sh go/<TAB>
Cheat Sheets
go/              go/Channels      go/Maps          go/func          go/packages      go/switch
go/:learn        go/Declarations  go/Operators     go/go            go/print         go/types
go/:list         go/Embedding     go/Pointers      go/hello         go/range
go/Arrays        go/Errors        go/Structs       go/http          go/rosetta/
go/Axioms        go/Interfaces    go/for           go/if            go/slices
$ zsh --version
zsh 5.8 (x86_64-ubuntu-linux-gnu)
Read more comments on GitHub >

github_iconTop Results From Across the Web

shell - Zsh tab-completion not working - Stack Overflow
Hello, after switching from Bash to Zsh on macOS Catalina, Tab completion stopped working for me. Apparently it is working in directories ...
Read more >
macOS Fix Zsh auto-completion and get more - Sindastra
The Fix. Now save, exit, close and reopen your terminal. Now your system utilities should have autocompletion!
Read more >
tab completion not working · Issue #5651 · ohmyzsh ... - GitHub
I have two accounts on my Macbook, both are installed oh-my-zsh. But one account cannot use the tab completion. When I uninstalled oh-my-zsh...
Read more >
shell - zsh tab completion not working specifically for running ...
In general tab-completion is working fine with zsh, except when I try to execute a script as in: zsh script.sh. In this case...
Read more >
Moving to zsh, part 5: Completions - Scripting OS X
In the default configuration, tab completion in zsh is very basic. It will complete commands and paths, but not much else.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found