Skip to content

Ability to manually assign a name for connections not defined in ~/.ssh/config #41

@json1c

Description

@json1c

First of all — thanks a lot for this handy tool, it's incredibly useful!

I wanted to suggest a small but practical feature:

Currently, the connection "Name" field is only available if it's explicitly defined in ~/.ssh/config via the Host entry. However, when connecting directly using ssh user@host -p 2222 or similar commands (i.e. not via a predefined config), there's no way to assign a meaningful name to that connection — and the interactive history view shows an empty name.

When no name is available, prompt the user to optionally enter a name before saving the connection to ~/.ggh/history.json.

Something like:
Enter name for this server (optional, press Enter to skip):

This would allow users to more easily distinguish frequently used connections in history, even if they're not stored in ~/.ssh/config.

Alternatively or additionally, supporting custom names via a .ggh/config.json file could be a nice enhancement.

Let me know if you'd be open to a PR — I’d be happy to help implement this

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions