Skip to content

Instantly share code, notes, and snippets.

@palaniraja
Last active June 11, 2023 19:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save palaniraja/e12ff78d71c58a0f24d8660c3c09fb2e to your computer and use it in GitHub Desktop.
Save palaniraja/e12ff78d71c58a0f24d8660c3c09fb2e to your computer and use it in GitHub Desktop.
custom prompt in af-magic zsh-theme - to show prompt in next line (so PWD can be above that) 'NEWLINE' in line #1 and #4 are the changes #12 to disable username@machine on right
NEWLINE=$'\n'
# primary prompt: dashed separator, directory and vcs info
PS1="${FG[237]}\${(l.\$(afmagic_dashes)..-.)}%{$reset_color%}
${FG[032]}%~\$(git_prompt_info)\$(hg_prompt_info) ${FG[105]}%(!.#.${NEWLINE}»)%{$reset_color%} "
PS2="%{$fg[red]%}\ %{$reset_color%}"
# right prompt: return code, virtualenv and context (user@host)
# added time stamp to right prompt [4:16:55]
RPS1="%D{%L:%M:%S} %(?..%{$fg[red]%}%? ↵%{$reset_color%})"
if (( $+functions[virtualenv_prompt_info] )); then
RPS1+='$(virtualenv_prompt_info)'
fi
# RPS1+=" ${FG[237]}%n@%m%{$reset_color%}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment