1

I have recently switched to zsh from bash. Deep in my inputrc, I had "\e[/": possible-completions set. This allowed me to see all completions at a given point, without applying them. This was really useful if I had typed ls folder/ and wanted to see what is in the folder. However, I can't seem to find this feature in zsh.

I actually cannot even find any mention of the option in bash on google, either, but it is in the man pages.

Is there any way to use this feature in zsh?

1

In zsh, a command that you can bind to a key is called a widget. There are several built-in widgets for completion, including list-choices, which I think is what you're looking for. It's bound to Ctrl+D by default.

But zsh offers a lot more possibilities than bash, so you may want to explore a bit. There are a few basic options related to completion, and then there's a huge completion system that is very powerful, but can be hard to configure from scratch.

0

This should work with zsh and oh-my-zsh, if I understood it properly. If not, install oh-my-zsh.

zsh-autosuggestions Installation

Manual (Git Clone)

Clone this repository somewhere on your machine. This guide will assume ~/.zsh/zsh-autosuggestions.

 git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions

Add the following to your .zshrc:

 source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh

Start a new terminal session.

Oh My Zsh

Clone this repository into $ZSH_CUSTOM/plugins (by default ~/.oh-my-zsh/custom/plugins)

 git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

Add the plugin to the list of plugins for Oh My Zsh to load (inside ~/.zshrc):

 plugins=(zsh-autosuggestions)

Start a new terminal session.

Source: GitHub link to package: https://github.com/zsh-users/zsh-autosuggestions Link to install info: https://github.com/zsh-users/zsh-autosuggestions/blob/master/INSTALL.md

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.