Created
December 29, 2022 01:24
-
-
Save cybertramp/dd009f863982fb32c1592ab827024092 to your computer and use it in GitHub Desktop.
oh-my-bash remove hostname
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
## You can remove display hostname partion | |
## | |
## Path: ~/.oh-my-bash/themes/agnoster/agnoster.theme.sh | |
## | |
## modify prompt_context() function | |
## | |
prompt_context() { | |
local user=$(whoami) | |
if [[ $user != $DEFAULT_USER || -n $SSH_CLIENT ]]; then | |
# >>> Original | |
#prompt_segment black default "$user@\h" | |
# >>> Modified | |
prompt_segment black default "$user" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment