Skip to content

Bash autocompletion for Geth #24145

@willianpaixao

Description

@willianpaixao

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:

  1. A new geth command is created, eg. geth completion, that dumps a completion script. When installing Geth, the uses adds source <(geth completion) to their ~/.bashrc or runs geth completion > /etc/bash_completion.d/geth.
  2. A completion script is written and included in this repository. Then the Geth documentation will guide the user to download the script and place it under ~/.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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions