-
Notifications
You must be signed in to change notification settings - Fork 20.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bash autocompletion for Geth #24145
Comments
I have been working on this Feature Request and I figured out that geth uses this library to manage the geth cli: gopkg.in/urfave/cli.v1 This library explains how could we do that with a bash script. I tried it yesterday and worked 🎉 . However it is necessary to run a script depend on your platform:
For that, I have been thinking include a tutorial page in |
I just tried it out on linux with bash and it is actually really nice - thanks for bringing this up! prepared it with #24313 - but would really appreciate if you do the tutorial as you offered. |
@ligi Yeah, of course! I have some issues to solve this week but I will be available next week. If someone else would like to implement it this week be free, however, if no one implement it until there, I'll do that 😉 |
@edualb still interested in writing something? |
@ligi Yeah! I am, but I have faced a problem when I tried to include a new page... I am on my job now and in the end of my shift I will put my issue here... If you can help I would be glad for that 💙 |
ya - LMK what problem you faced and I will try to find a way around it |
@ligi sorry for my delay 🤐 I realized that my docker had an old image and my |
We now ship bash completions in the Ubuntu package. |
Rationale
Why should this feature exist?
Geth has a huge number of commands and options to be passed. Some commands need arguments and sometimes it's complicated to say which order you need to provide.
A Bash completion script would give hints of what can be expected when pressing TAB.
What are the use-cases?
Every Geth developer or beginner that often uses Geth's CLI.
Implementation
Do you have ideas regarding the implementation of this feature?
Two approaches can be taken:
geth completion
, that dumps a completion script. When installing Geth, the uses addssource <(geth completion)
to their~/.bashrc
or runsgeth completion > /etc/bash_completion.d/geth
.~/.bash_completion.d/geth
or/etc/bash_completion.d/geth
. In this option, no Go source code will be changed.Are you willing to implement this feature?
Yes.
References
The text was updated successfully, but these errors were encountered: