Skip to content

Use '-s' Flag For USERHOST Segment  #41

@Yankas

Description

@Yankas

Currently, the USERHOST segment uses the output of hostname. If called with no options, hostname will default to printing the fully qualified domain name (like hostname -f). The domain component is omitted (hostname -s) on Linux (GNU/Glibc?) systems.
A quick check on the FreeBSD manpage for hostname shows that it also defaults to using the -f flag.

I suggest using ('hostname -s') to unify the behavior across systems, since that i what most users would likely expect/want the segment to do. Another option would be to make the flag configurable, though I do not see much demand for an option to clutter the screen with the FQDN every time.

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