mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-12-26 13:14:35 +00:00
Add custom SSH prompt
This commit is contained in:
parent
31e8b174e3
commit
4458c4f7ee
|
@ -25,8 +25,8 @@ setopt promptsubst # enable command substitution in prompt
|
||||||
|
|
||||||
# Primary Prompt
|
# Primary Prompt
|
||||||
[ "$EUID" -eq 0 ] && PS1="$RED%n$RESET" || PS1="$GREEN%n$RESET" # user@machine
|
[ "$EUID" -eq 0 ] && PS1="$RED%n$RESET" || PS1="$GREEN%n$RESET" # user@machine
|
||||||
#PS1+=" $BLUE%~" # Working directory, no autotrim
|
#PS1+=" $BLUE%~" # Working directory
|
||||||
PS1+=" $BLUE%(5~|%-1~/…/%3~|%4~)" # Working directory + autotrim
|
PS1+=" $BLUE%(5~|%-1~/…/%3~|%4~)"
|
||||||
PS1+="\$(git_prompt)"
|
PS1+="\$(git_prompt)"
|
||||||
PS1+=" $PURPLE%(!.#.»)$RESET " # Final symbol (# or »)
|
PS1+=" $PURPLE%(!.#.»)$RESET " # Final symbol (# or »)
|
||||||
|
|
||||||
|
@ -35,3 +35,8 @@ PS2="$RED\ $RESET"
|
||||||
|
|
||||||
# Right side prompt (on error)
|
# Right side prompt (on error)
|
||||||
RPS1="%(?..$RED%? ↵$RESET)"
|
RPS1="%(?..$RED%? ↵$RESET)"
|
||||||
|
|
||||||
|
# SSH Prompt
|
||||||
|
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
|
||||||
|
PS1="$PURPLE(ssh) $RESET${PS1}"
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue