My zsh configuration
git clone https://mcol.xyz/code/zshrc
Log | Files | Refs | Submodules | README

commit f540541f53897584de2e045d8f86d830941d6b9f
parent 86406dc2d7cbe15841f73d1b234add11bc5d64e3
Author: mcol <mcol@posteo.net>
Date:   Thu, 28 May 2020 19:38:17 +0100

update prompt and aliases

Diffstat:
Maliases | 5+++--
Mthemes/ban.zsh-theme | 21++++++++++++++-------
Mzshrc | 6+++---
3 files changed, 20 insertions(+), 12 deletions(-)

diff --git a/aliases b/aliases @@ -66,8 +66,8 @@ alias psi='python setup.py install' alias psiu='python setup.py install --user' # quick edits -alias modalia='vim $HOME/.config/aliases' -alias modaliaz='vim $ZSH/aliases' +alias modalia='vim $HOME/.config/aliases && source $HOME/.config/aliases' +alias modaliaz='vim $ZSH/aliases && source $ZSH/aliases' alias vimrc='vim $HOME/.vim/bundle/vim-misc/vimrc' alias zshrc='vim $HOME/.zsh/zshrc' alias modrc='vim $HOME/.config/ranger/rc.conf' @@ -77,6 +77,7 @@ alias gc='cd $HOME/.config; l' alias gh='cd $HOME; ls' alias gd='cd $HOME/documents' alias gD='cd $HOME/Downloads' +alias gDe='cd $HOME/Desktop' alias gg='cd $HOME/git; l' alias gb='cd $HOME/.config/bin; ls' alias ge='cd /etc' diff --git a/themes/ban.zsh-theme b/themes/ban.zsh-theme @@ -18,9 +18,11 @@ if $IS_SSH then SEGMENT_SEPARATOR_L=$'\ue0b0' SEGMENT_SEPARATOR_R=$'' + SEGMENT_END=$'\ue0b0' else - SEGMENT_SEPARATOR_L=$'' - SEGMENT_SEPARATOR_R=$'' + SEGMENT_SEPARATOR_L=$'▋▌' + #SEGMENT_SEPARATOR_R=$'' + #SEGMENT_END=$'' fi } @@ -43,7 +45,7 @@ prompt_segment() { # End the prompt, closing any open segments prompt_end() { if [[ -n $CURRENT_BG ]]; then - echo -n "%{%k%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR" + echo -n "%{%k%F{$CURRENT_BG}%}$SEGMENT_END" else echo -n "%{%k%}" fi @@ -98,16 +100,20 @@ prompt_context() { prompt_dir() { - prompt_segment magenta black ' %3~ ' + prompt_segment magenta 4 ' %4~ ' + #dir=$(print -Pn '%3~/') + #[[ "${(q)dir:0:2}" == '\~/' ]] && dir="%F{12}🏠%F{black}${dir:1}" + #echo -n " $dir " } prompt_mes() { if [[ $RETVAL -ne 0 ]] then - prompt_segment red black ' > ' + #prompt_segment red black ' ▶ ' + prompt_segment black red '▍' else - prompt_segment blue black ' > ' + prompt_segment black magenta '▍' fi } @@ -141,7 +147,8 @@ else fi if $IS_TMUX then - tmux_indicator=$'\ue0b0' + #tmux_indicator=$'\ue0b0' + tmux_indicator=⬜ else tmux_indicator='' fi diff --git a/zshrc b/zshrc @@ -24,8 +24,8 @@ ZSH_COMPDUMP="$HOME/.zcompdump" # zsh history HISTFILE="$HOME/.zsh_history" -HISTSIZE=8000 -SAVEHIST=4000 +HISTSIZE=12000 +SAVEHIST=8000 setopt SHARE_HISTORY setopt HIST_IGNORE_ALL_DUPS setopt HIST_REDUCE_BLANKS @@ -68,4 +68,4 @@ export LC_CTYPE=en_US.UTF-8 # don't load default ranger config export RANGER_LOAD_DEFAULT_RC=FALSE -export PYTHONPATH=$HOME/work/analysis/reach +export PYTHONPATH=$HOME/git/reach