Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[path] add option to use a short path instead of full relative #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion agnoster.zsh-theme
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
CURRENT_BG='NONE'
PRIMARY_FG=black

# if AGNOSTER_SHORT_PATH is set use %1~ for the path value
# that will turn '~/.oh-my-zsh/custom/themes' in to 'themes'
[ -n "${AGNOSTER_SHORT_PATH}" ] && AGNOSTER_CURRENT_PATH=' %1~ '

# Characters
SEGMENT_SEPARATOR="\ue0b0"
PLUSMINUS="\u00b1"
Expand Down Expand Up @@ -103,7 +107,8 @@ prompt_git() {

# Dir: current working directory
prompt_dir() {
prompt_segment blue $PRIMARY_FG ' %~ '
local current_path=${AGNOSTER_CURRENT_PATH:=' %~ '}
prompt_segment blue $PRIMARY_FG "${current_path}"
}

# Status:
Expand Down