GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
PROMPT_HOSTNAME(1) fish-shell PROMPT_HOSTNAME(1)

prompt_hostname - print the hostname, shortened for use in the prompt

prompt_hostname

prompt_hostname prints a shortened version the current hostname for use in the prompt. It will print just the first component of the hostname, everything up to the first dot.

function fish_prompt

echo -n (whoami)@(prompt_hostname) (prompt_pwd) '$ ' end


# The machine's full hostname is foo.bar.com
>_ prompt_hostname
foo


2024, fish-shell developers

July 5, 2025 4.0

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.