Remix.run Logo
robenkleene 2 days ago

Ah, good point, this isn’t `oh-my-zsh` but it does require a couple of options to work as described:

1. `setopt autopushd pushdsilent`: This is the key component, `autopushd` automatically adds directories to the directory stack (and `pushdsilent` option does it without echoing added directories). Without this option, there’s no directory stack to traverse (unless directories are first manually added to it with `pushd` [for completion, `popd` pops directories off the stack navigating back to those directories]). `autopushd` just calls `pushd` on the current directory after each `cd`.

2. To get a menu, Zsh completion also has to be loaded, e.g., `autoload -Uz compinit && compinit -C`

3. Finally `zstyle ':completion:*' menu select` is optional, but that highlights the selected match, which is a nicer UI in my opinion.

Those are the options I used to get this working with `zsh -f` (which starts Zsh with a default config).

sandreas 2 days ago | parent [-]

Works, is really nice, thank you.

May I (auto-)suggest:

https://github.com/zsh-users/zsh-autosuggestions

Have fun ;-)