Last active
December 31, 2024 10:49
-
-
Save razsbg/b85156f12b350bb23a9dc77f0c53f831 to your computer and use it in GitHub Desktop.
Custom `agnoster` path - display last dir in the current path
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
# Path to file | |
# .oh-my-zsh/themes/agnoster.zsh-theme | |
# Dir: current working directory | |
prompt_dir() { | |
# Default | |
# Display the full path | |
# prompt_segment blue $CURRENT_FG '%~' | |
# Custom | |
# Zsh expansion that truncates the path to just the last directory in the current path. | |
# Thanks, chatgippitty :) | |
prompt_segment blue $CURRENT_FG '%1~' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment