Truncate to repo.
This commit is contained in:
parent
770444649a
commit
7399975870
@ -232,6 +232,7 @@
|
|||||||
# If directory is too long, shorten some of its segments to the shortest possible unique
|
# If directory is too long, shorten some of its segments to the shortest possible unique
|
||||||
# prefix. The shortened directory can be tab-completed to the original.
|
# prefix. The shortened directory can be tab-completed to the original.
|
||||||
typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique
|
typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique
|
||||||
|
typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=true
|
||||||
# Replace removed segment suffixes with this symbol.
|
# Replace removed segment suffixes with this symbol.
|
||||||
typeset -g POWERLEVEL9K_SHORTEN_DELIMITER=
|
typeset -g POWERLEVEL9K_SHORTEN_DELIMITER=
|
||||||
# Color of the shortened directory segments.
|
# Color of the shortened directory segments.
|
||||||
@ -267,7 +268,7 @@
|
|||||||
# directory will be shortened only when prompt doesn't fit or when other parameters demand it
|
# directory will be shortened only when prompt doesn't fit or when other parameters demand it
|
||||||
# (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below).
|
# (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below).
|
||||||
# If set to `0`, directory will always be shortened to its minimum length.
|
# If set to `0`, directory will always be shortened to its minimum length.
|
||||||
typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=0
|
typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80
|
||||||
# When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this
|
# When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this
|
||||||
# many columns for typing commands.
|
# many columns for typing commands.
|
||||||
typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40
|
typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40
|
||||||
@ -399,7 +400,7 @@
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# ⇣42 if behind the remote.
|
# ⇣42 if behind the remote.
|
||||||
(( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}${VCS_STATUS_COMMITS_BEHIND}${conflicted}⇣${clear}"
|
(( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}${VCS_STATUS_COMMITS_BEHIND}${conflicted}⇣${clean}"
|
||||||
# ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
|
# ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
|
||||||
(( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
|
(( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
|
||||||
(( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}${VCS_STATUS_COMMITS_AHEAD}${staged}⇡${clean}"
|
(( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}${VCS_STATUS_COMMITS_AHEAD}${staged}⇡${clean}"
|
||||||
|
15
zsh/zshrc
15
zsh/zshrc
@ -1,6 +1,3 @@
|
|||||||
HISTSIZE=10000
|
|
||||||
SAVEHIST=$HISTSIZE
|
|
||||||
HISTFILE=~/.zsh_history
|
|
||||||
autoload -U compinit && compinit
|
autoload -U compinit && compinit
|
||||||
autoload -U promptinit && promptinit
|
autoload -U promptinit && promptinit
|
||||||
|
|
||||||
@ -19,4 +16,16 @@ source ~/.zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
|||||||
source ~/.zsh/themes/powerlevel10k/powerlevel10k.zsh-theme
|
source ~/.zsh/themes/powerlevel10k/powerlevel10k.zsh-theme
|
||||||
|
|
||||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||||
|
#function zsh_directory_name() {
|
||||||
|
# emulate -L zsh
|
||||||
|
# [[ $1 == d ]] || return
|
||||||
|
# while [[ $2 != / ]]; do
|
||||||
|
# if [[ -e $2/.git ]]; then
|
||||||
|
# typeset -ga reply=(${2:t} $#2)
|
||||||
|
# return
|
||||||
|
# fi
|
||||||
|
# 2=${2:h}
|
||||||
|
# done
|
||||||
|
# return 1
|
||||||
|
#}
|
||||||
[ -e ~/.zshrc.local ] && source ~/.zshrc.local
|
[ -e ~/.zshrc.local ] && source ~/.zshrc.local
|
||||||
|
Loading…
Reference in New Issue
Block a user