▲ | sandreas 2 days ago | |||||||
Seems to be some kind of oh-my-zsh thing... cd - <TAB> does not work on my zsh config. | ||||||||
▲ | robenkleene 2 days ago | parent [-] | |||||||
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). | ||||||||
|