Skip to content

Conversation

@Hrily
Copy link

@Hrily Hrily commented Oct 4, 2018

Fixes #16

I added this feature by using gnu readline's bind feature to map ? to press Enter. But I needed to differentiate normal Enter and ? Enter, so that I can reprint previous command in case of ?. So I mapped ? to some random string(which most probably won't be used in any command).

One problem with this feature is, it won't let us use ? in commands. I minimized this by showing help only when ? has space or no character before it.

Sample output:

root@dev:~# ?
Help:
           bash - No help provided
             ls - No help provided
           show - No help provided
            top - No help provided
root@dev:~# show ?
Help:
           disk - No help provided
root@dev:~# show 

I hope this solves the issue for you.

Also, I have no idea how we should test this feature. Can you provide me some insights on it?

@damrkul
Copy link

damrkul commented Oct 25, 2023

? is commonly used in cisco-like CLI's . Would really like to have that functionality in.

@italorossi italorossi self-assigned this Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

capture key ? and show help without press enter

4 participants