Skip to content

Instantly share code, notes, and snippets.

@Bhacaz
Last active September 8, 2017 13:06
Show Gist options
  • Save Bhacaz/c6dd2db52753507697ac07696b870f89 to your computer and use it in GitHub Desktop.
Save Bhacaz/c6dd2db52753507697ac07696b870f89 to your computer and use it in GitHub Desktop.
Change the prompt to be more like Shell and only display the current folder.
diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme
index 07546fd..e6dec73 100644
--- a/themes/agnoster.zsh-theme
+++ b/themes/agnoster.zsh-theme
@@ -80,7 +80,7 @@ prompt_end() {
# Context: user@hostname (who am I and where am I)
prompt_context() {
if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
- prompt_segment black default "%(!.%{%F{yellow}%}.)$USER@%m"
+ prompt_segment black default "%(!.%{%F{yellow}%}.)$USER:"
fi
}
@@ -187,7 +187,7 @@ prompt_hg() {
# Dir: current working directory
prompt_dir() {
- prompt_segment blue black '%~'
+ prompt_segment blue black '%1//'
}
# Virtualenv: current working virtualenv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment