diff options
| author | Blista Kanjo | 2023-08-02 20:40:22 -0400 |
|---|---|---|
| committer | Blista Kanjo | 2023-08-02 20:40:22 -0400 |
| commit | 0b8db4f1c67d001d7e43ac9154a6cbdbcfb1790e (patch) | |
| tree | 45dfcfd0721c641a3b02b54dc9ec040861e6e63e /.config/shell | |
| parent | b8322b5b705e77e61800e9960bdac3e99bb23ac5 (diff) | |
feat: migrated `fish` config to `zsh` (may be buggy)
Diffstat (limited to '.config/shell')
| -rw-r--r-- | .config/shell/.zshrc | 120 | ||||
| -rw-r--r-- | .config/shell/git-prompt.zsh | 402 | ||||
| -rw-r--r-- | .config/shell/git-prompt_examples/ascii.zsh | 25 | ||||
| -rw-r--r-- | .config/shell/git-prompt_examples/bashgitprompt.zsh | 28 | ||||
| -rw-r--r-- | .config/shell/git-prompt_examples/compact.zsh | 24 | ||||
| -rw-r--r-- | .config/shell/git-prompt_examples/default.zsh | 25 | ||||
| -rw-r--r-- | .config/shell/git-prompt_examples/kj_sh604.zsh | 70 | ||||
| -rw-r--r-- | .config/shell/git-prompt_examples/multiline.zsh | 24 | ||||
| -rw-r--r-- | .config/shell/git-prompt_examples/pure.zsh | 74 | ||||
| -rw-r--r-- | .config/shell/git-prompt_examples/rprompt.zsh | 24 | ||||
| -rw-r--r-- | .config/shell/git-prompt_examples/wprompt.zsh | 97 |
11 files changed, 913 insertions, 0 deletions
diff --git a/.config/shell/.zshrc b/.config/shell/.zshrc new file mode 100644 index 0000000..ab33aa5 --- /dev/null +++ b/.config/shell/.zshrc @@ -0,0 +1,120 @@ +# source zsh extensions (order is important) +source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh +source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh +source ~/.config/shell/git-prompt.zsh +source ~/.config/shell/git-prompt_examples/kj_sh604.zsh + + +# configure history settings +HISTFILE=~/.local/state/shell/zsh_history +HISTSIZE=9223372036854775804 +SAVEHIST=9223372036854775804 + +# aliases + # personal aliases + alias ls="ls --group-directories-first -h -p --color -F" + alias s="cd ~/.local/bin && ls" + alias d="disown" + alias c="cal" + alias w="curl wttr.in" + alias x="startx" + alias t="timedatectl" + alias p="command yay" + alias pu="command yay -Syyu --answerclean yes --rebuildall --noconfirm" + alias yay="echo" + alias neofetch="alsi" + + # youtube-dl aliases + alias yt-mp4="youtube-dl -cif 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best'" + alias yt-webm="youtube-dl -cif 'bestvideo[ext=webm]+bestaudio[ext=webm]/best[ext=webm]/best'" + alias yt-m4a="youtube-dl -cif 'bestaudio[ext=m4a]'" + + # pomodoro timer aliases + alias work="timer 30m && notify-send \ + 'Pomodoro' 'Work Timer is up! Take a Break š' -i \ + ~/.cache/pomo/pomo-tomato.png -t 30000 -w -A 'Dismiss'\ + & disown; mpv '/home/kylert/.cache/pomo/pomo-sound.mp3'" + + alias rest="timer 10m && notify-send \ + 'Pomodoro' 'Break is over! Get back to work š¬' -i \ + ~/.cache/pomo/pomo-tomato.png -t 30000 -w -A 'Dismiss'\ + & disown; mpv '/home/kylert/.cache/pomo/pomo-sound.mp3'" + + # experimental rust-uutits substitutions for testing + alias basenc=uu-basenc + alias groups=uu-groups + alias hostname=uu-hostname + alias join=uu-join + alias kill=uu-kill + alias pathchk=uu-pathchk + alias realpath=uu-realpath + alias touch=uu-touch + +# pfetch stuff +export PF_INFO="ascii title os kernel uptime pkgs memory" + +# initiate the prompt configuration with color support +autoload -Uz colors && colors + +# load auto/tab completion and include hidden files +autoload -Uz compinit +zstyle ':completion:*' menu select +zmodload zsh/complist +compinit +_comp_options+=(globdots) + +# opt-in for automatic directory navigation and disallow terminal freeze via ctrl-s +setopt AUTO_CD NO_FLOW_CONTROL +setopt INTERACTIVE_COMMENTS + +# enable vi mode and setup keys for tab completion +bindkey -v +export KEYTIMEOUT=1 +bindkey -M menuselect 'h' vi-backward-char +bindkey -M menuselect 'k' vi-up-line-or-history +bindkey -M menuselect 'l' vi-forward-char +bindkey -M menuselect 'j' vi-down-line-or-history +bindkey -v '^?' backward-delete-char + +# edit line in vim with ctrl-e +autoload -Uz edit-command-line; zle -N edit-command-line +bindkey '\ee' edit-command-line +bindkey -M vicmd '^[[P' vi-delete-char +bindkey -M vicmd '\ee' edit-command-line +bindkey -M visual '^[[P' vi-delete + +# cursor shape settings for vi modes +function zle-keymap-select() { + case $KEYMAP in + vicmd) + print -n '\e[2 q' + ;; + viins|main) + print -n '\e[6 q' + ;; + esac +} +zle -N zle-keymap-select + +zle-line-init() { + zle -K viins + print -n "\e[6 q" +} +zle -N zle-line-init +print -n '\e[6 q' + +# disable blinking cursor after each command execution +function disable_blinking_cursor() { + print -n '\e[0 q' +} +precmd_functions+=(disable_blinking_cursor) +disable_blinking_cursor + +# less termcap variables (for colored man pages) +export LESS_TERMCAP_mb=$'\e[1;32m' +export LESS_TERMCAP_md=$'\e[1;32m' +export LESS_TERMCAP_me=$'\e[0m' +export LESS_TERMCAP_se=$'\e[0m' +export LESS_TERMCAP_so=$'\e[01;31m' +export LESS_TERMCAP_ue=$'\e[0m' +export LESS_TERMCAP_us=$'\e[1;4;33m' diff --git a/.config/shell/git-prompt.zsh b/.config/shell/git-prompt.zsh new file mode 100644 index 0000000..9c68ec6 --- /dev/null +++ b/.config/shell/git-prompt.zsh @@ -0,0 +1,402 @@ +# git-prompt.zsh -- a lightweight git prompt for zsh. +# Copyright Ā© 2023 Wolfgang Popp +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +autoload -U colors && colors + +# Settings +: "${ZSH_GIT_PROMPT_SHOW_UPSTREAM=""}" +: "${ZSH_GIT_PROMPT_SHOW_STASH=""}" +: "${ZSH_GIT_PROMPT_ENABLE_SECONDARY=""}" +: "${ZSH_GIT_PROMPT_NO_ASYNC=""}" +: "${ZSH_GIT_PROMPT_FORCE_BLANK=""}" +: "${ZSH_GIT_PROMPT_AWK_CMD=""}" + +# Theming +: "${ZSH_THEME_GIT_PROMPT_PREFIX="["}" +: "${ZSH_THEME_GIT_PROMPT_SUFFIX="] "}" +: "${ZSH_THEME_GIT_PROMPT_SEPARATOR="|"}" +: "${ZSH_THEME_GIT_PROMPT_DETACHED="%{$fg_bold[cyan]%}:"}" +: "${ZSH_THEME_GIT_PROMPT_BRANCH="%{$fg_bold[magenta]%}"}" +: "${ZSH_THEME_GIT_PROMPT_UPSTREAM_SYMBOL="%{$fg_bold[yellow]%}ā³ "}" +: "${ZSH_THEME_GIT_PROMPT_UPSTREAM_NO_TRACKING=""}" +: "${ZSH_THEME_GIT_PROMPT_UPSTREAM_PREFIX="%{$fg[red]%}(%{$fg[yellow]%}"}" +: "${ZSH_THEME_GIT_PROMPT_UPSTREAM_SUFFIX="%{$fg[red]%})"}" +: "${ZSH_THEME_GIT_PROMPT_BEHIND="ā"}" +: "${ZSH_THEME_GIT_PROMPT_AHEAD="ā"}" +: "${ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[red]%}ā"}" +: "${ZSH_THEME_GIT_PROMPT_STAGED="%{$fg[green]%}ā"}" +: "${ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg[red]%}ā"}" +: "${ZSH_THEME_GIT_PROMPT_UNTRACKED="ā¦"}" +: "${ZSH_THEME_GIT_PROMPT_STASHED="%{$fg[blue]%}ā"}" +: "${ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}ā"}" +: "${ZSH_THEME_GIT_PROMPT_SECONDARY_PREFIX=""}" +: "${ZSH_THEME_GIT_PROMPT_SECONDARY_SUFFIX=""}" +: "${ZSH_THEME_GIT_PROMPT_TAGS_SEPARATOR=", "}" +: "${ZSH_THEME_GIT_PROMPT_TAGS_PREFIX="š· "}" +: "${ZSH_THEME_GIT_PROMPT_TAGS_SUFFIX=""}" +: "${ZSH_THEME_GIT_PROMPT_TAG="%{$fg_bold[magenta]%}"}" + +# Disable promptinit if it is loaded +(( $+functions[promptinit] )) && {promptinit; prompt off} + +# Allow parameter and command substitution in the prompt +setopt PROMPT_SUBST + +# Override PROMPT if it does not use the gitprompt function +[[ "$PROMPT" != *gitprompt* && "$RPROMPT" != *gitprompt* ]] \ + && PROMPT='%B%40<..<%~ %b$(gitprompt)' \ + && PROMPT+='%(?.%(!.%F{white}āÆ%F{yellow}āÆ%F{red}.%F{blue}āÆ%F{cyan}āÆ%F{green})āÆ.%F{red}āÆāÆāÆ)%f ' + +# Find an awk implementation +# Prefer nawk over mawk and mawk over awk +(( $+commands[mawk] )) && : "${ZSH_GIT_PROMPT_AWK_CMD:=mawk}" +(( $+commands[nawk] )) && : "${ZSH_GIT_PROMPT_AWK_CMD:=nawk}" + : "${ZSH_GIT_PROMPT_AWK_CMD:=awk}" + +function _zsh_git_prompt_git_status() { + emulate -L zsh + { + [[ -n "$ZSH_GIT_PROMPT_SHOW_STASH" ]] && ( + c=$(command git rev-list --walk-reflogs --count refs/stash 2> /dev/null) + [[ -n "$c" ]] && echo "# stash.count $c" + ) + GIT_OPTIONAL_LOCKS=0 command git status --branch --porcelain=v2 2>&1 \ + || echo "fatal: git command failed" + } | $ZSH_GIT_PROMPT_AWK_CMD \ + -v PREFIX="$ZSH_THEME_GIT_PROMPT_PREFIX" \ + -v SUFFIX="$ZSH_THEME_GIT_PROMPT_SUFFIX" \ + -v SEPARATOR="$ZSH_THEME_GIT_PROMPT_SEPARATOR" \ + -v DETACHED="$ZSH_THEME_GIT_PROMPT_DETACHED" \ + -v BRANCH="$ZSH_THEME_GIT_PROMPT_BRANCH" \ + -v UPSTREAM_TYPE="$ZSH_GIT_PROMPT_SHOW_UPSTREAM" \ + -v UPSTREAM_SYMBOL="$ZSH_THEME_GIT_PROMPT_UPSTREAM_SYMBOL" \ + -v UPSTREAM_NO_TRACKING="$ZSH_THEME_GIT_PROMPT_UPSTREAM_NO_TRACKING" \ + -v UPSTREAM_PREFIX="$ZSH_THEME_GIT_PROMPT_UPSTREAM_PREFIX" \ + -v UPSTREAM_SUFFIX="$ZSH_THEME_GIT_PROMPT_UPSTREAM_SUFFIX" \ + -v BEHIND="$ZSH_THEME_GIT_PROMPT_BEHIND" \ + -v AHEAD="$ZSH_THEME_GIT_PROMPT_AHEAD" \ + -v UNMERGED="$ZSH_THEME_GIT_PROMPT_UNMERGED" \ + -v STAGED="$ZSH_THEME_GIT_PROMPT_STAGED" \ + -v UNSTAGED="$ZSH_THEME_GIT_PROMPT_UNSTAGED" \ + -v UNTRACKED="$ZSH_THEME_GIT_PROMPT_UNTRACKED" \ + -v STASHED="$ZSH_THEME_GIT_PROMPT_STASHED" \ + -v CLEAN="$ZSH_THEME_GIT_PROMPT_CLEAN" \ + -v RC="%{$reset_color%}" \ + ' + BEGIN { + ORS = ""; + + fatal = 0; + oid = ""; + head = ""; + upstream = ""; + ahead = 0; + behind = 0; + untracked = 0; + unmerged = 0; + staged = 0; + unstaged = 0; + stashed = 0; + } + + $1 == "fatal:" { + fatal = 1; + } + + $2 == "branch.oid" { + oid = $3; + } + + $2 == "branch.head" { + head = $3; + } + + $2 == "branch.upstream" { + upstream = $3; + } + + $2 == "branch.ab" { + ahead = $3; + behind = $4; + } + + $1 == "?" { + ++untracked; + } + + $1 == "u" { + ++unmerged; + } + + $1 == "1" || $1 == "2" { + split($2, arr, ""); + if (arr[1] != ".") { + ++staged; + } + if (arr[2] != ".") { + ++unstaged; + } + } + + $2 == "stash.count" { + stashed = $3; + } + + END { + if (fatal == 1) { + exit(1); + } + + print PREFIX; + print RC; + + if (head == "(detached)") { + print DETACHED; + print substr(oid, 0, 7); + } else { + print BRANCH; + gsub("%", "%%", head); + print head; + } + print RC; + + if (upstream == "") { + print UPSTREAM_NO_TRACKING; + } else if (UPSTREAM_TYPE == "symbol") { + print UPSTREAM_SYMBOL; + } else if (UPSTREAM_TYPE == "full") { + print UPSTREAM_PREFIX; + gsub("%", "%%", upstream); + print upstream; + print UPSTREAM_SUFFIX; + } + + print RC; + + if (behind < 0) { + print BEHIND; + printf "%d", behind * -1; + print RC; + } + + if (ahead > 0) { + print AHEAD; + printf "%d", ahead; + print RC; + } + + print SEPARATOR; + + if (unmerged > 0) { + print UNMERGED; + print unmerged; + print RC; + } + + if (staged > 0) { + print STAGED; + print staged; + print RC; + } + + if (unstaged > 0) { + print UNSTAGED; + print unstaged; + print RC; + } + + if (untracked > 0) { + print UNTRACKED; + print untracked; + print RC; + } + + if (stashed > 0) { + print STASHED; + print stashed; + print RC; + } + + if (unmerged == 0 && staged == 0 && unstaged == 0 && untracked == 0) { + print CLEAN; + print RC; + } + + print SUFFIX; + print RC; + } + ' +} + +function _zsh_git_prompt_git_status_secondary() { + tags=$(command git tag --points-at=HEAD 2> /dev/null) + + [[ -z "$tags" ]] && return + + echo -n ${ZSH_THEME_GIT_PROMPT_SECONDARY_PREFIX} + echo -n ${ZSH_THEME_GIT_PROMPT_TAGS_PREFIX} + + echo "$tags" | $ZSH_GIT_PROMPT_AWK_CMD \ + -v SEPARATOR="$ZSH_THEME_GIT_PROMPT_TAGS_SEPARATOR" \ + -v TAG="$ZSH_THEME_GIT_PROMPT_TAG" \ + -v RC="%{$reset_color%}" \ + ' + BEGIN { + ORS = ""; + } + { + if (NR != 1) { + print SEPARATOR; + print RC; + } + print TAG; + print $0; + print RC; + } + ' + + echo -n ${ZSH_THEME_GIT_PROMPT_TAGS_SUFFIX} + echo -n ${ZSH_THEME_GIT_PROMPT_SECONDARY_SUFFIX} +} + + +# The async code is taken from +# https://github.com/zsh-users/zsh-autosuggestions/blob/master/src/async.zsh + +zmodload zsh/system + +function _zsh_git_prompt_async_request() { + typeset -g _ZSH_GIT_PROMPT_ASYNC_FD _ZSH_GIT_PROMPT_ASYNC_PID + + # If we've got a pending request, cancel it + if [[ -n "$_ZSH_GIT_PROMPT_ASYNC_FD" ]] && { true <&$_ZSH_GIT_PROMPT_ASYNC_FD } 2>/dev/null; + then + + # Close the file descriptor and remove the handler + exec {_ZSH_GIT_PROMPT_ASYNC_FD}<&- + zle -F $_ZSH_GIT_PROMPT_ASYNC_FD + + # Zsh will make a new process group for the child process only if job + # control is enabled (MONITOR option) + if [[ -o MONITOR ]]; then + # Send the signal to the process group to kill any processes that may + # have been forked by the suggestion strategy + kill -TERM -$_ZSH_GIT_PROMPT_ASYNC_PID 2>/dev/null + else + # Kill just the child process since it wasn't placed in a new process + # group. If the suggestion strategy forked any child processes they may + # be orphaned and left behind. + kill -TERM $_ZSH_GIT_PROMPT_ASYNC_PID 2>/dev/null + fi + fi + + # Fork a process to fetch the git status and open a pipe to read from it + exec {_ZSH_GIT_PROMPT_ASYNC_FD}< <( + # Tell parent process our pid + builtin echo $sysparams[pid] + + _zsh_git_prompt_git_status + [[ -n "$ZSH_GIT_PROMPT_ENABLE_SECONDARY" ]] \ + && builtin echo -n "##secondary##" \ + && _zsh_git_prompt_git_status_secondary + ) + + # There's a weird bug here where ^C stops working unless we force a fork + # See https://github.com/zsh-users/zsh-autosuggestions/issues/364 + command true + + # Read the pid from the child process + read _ZSH_GIT_PROMPT_ASYNC_PID <&$_ZSH_GIT_PROMPT_ASYNC_FD + + # When the fd is readable, call the response handler + zle -F "$_ZSH_GIT_PROMPT_ASYNC_FD" _zsh_git_prompt_callback +} + +# Called when new data is ready to be read from the pipe +# First arg will be fd ready for reading +# Second arg will be passed in case of error +_ZSH_GIT_PROMPT_STATUS_OUTPUT="" +_ZSH_GIT_PROMPT_STATUS_SECONDARY_OUTPUT="" +function _zsh_git_prompt_callback() { + emulate -L zsh + local old_primary="$_ZSH_GIT_PROMPT_STATUS_OUTPUT" + local old_secondary="$_ZSH_GIT_PROMPT_STATUS_SECONDARY_OUTPUT" + local fd_data + local -a output + + if [[ -z "$2" || "$2" == "hup" ]]; then + # Read output from fd + fd_data="$(cat <&$1)" + output=( ${(s:##secondary##:)fd_data} ) + _ZSH_GIT_PROMPT_STATUS_OUTPUT="${output[1]}" + _ZSH_GIT_PROMPT_STATUS_SECONDARY_OUTPUT="${output[2]}" + + if [[ "$old_primary" != "$_ZSH_GIT_PROMPT_STATUS_OUTPUT" ]] \ + || [[ "$old_secondary" != "$_ZSH_GIT_PROMPT_STATUS_SECONDARY_OUTPUT" ]] ; then + zle reset-prompt + zle -R + fi + + # Close the fd + exec {1}<&- + fi + + # Always remove the handler + zle -F "$1" + + # Unset global FD variable to prevent closing user created FDs in the precmd hook + unset _ZSH_GIT_PROMPT_ASYNC_FD +} + +function _zsh_git_prompt_precmd_hook() { + if [[ -n "$ZSH_GIT_PROMPT_FORCE_BLANK" ]]; then + _ZSH_GIT_PROMPT_STATUS_OUTPUT="" + _ZSH_GIT_PROMPT_STATUS_SECONDARY_OUTPUT="" + fi + _zsh_git_prompt_async_request +} + +if (( $+commands[git] )); then + if [[ -z "$ZSH_GIT_PROMPT_NO_ASYNC" ]]; then + autoload -U add-zsh-hook \ + && add-zsh-hook precmd _zsh_git_prompt_precmd_hook + + function gitprompt() { + echo -n "$_ZSH_GIT_PROMPT_STATUS_OUTPUT" + } + + function gitprompt_secondary() { + echo -n "$_ZSH_GIT_PROMPT_STATUS_SECONDARY_OUTPUT" + } + else + function gitprompt() { + _zsh_git_prompt_git_status + } + + function gitprompt_secondary() { + [[ -n "$ZSH_GIT_PROMPT_ENABLE_SECONDARY" ]] \ + && _zsh_git_prompt_git_status_secondary + } + fi +else + function gitprompt() { } + function gitprompt_secondary() { } +fi diff --git a/.config/shell/git-prompt_examples/ascii.zsh b/.config/shell/git-prompt_examples/ascii.zsh new file mode 100644 index 0000000..986d08c --- /dev/null +++ b/.config/shell/git-prompt_examples/ascii.zsh @@ -0,0 +1,25 @@ +# Name: Ascii +# Description: A prompt using only ASCII characters. + +ZSH_GIT_PROMPT_SHOW_UPSTREAM="no" + +ZSH_THEME_GIT_PROMPT_PREFIX=" " +ZSH_THEME_GIT_PROMPT_SUFFIX="" +ZSH_THEME_GIT_PROMPT_SEPARATOR=" " +ZSH_THEME_GIT_PROMPT_DETACHED="%{$fg_bold[cyan]%}:" +ZSH_THEME_GIT_PROMPT_BRANCH="%{$fg_bold[magenta]%}" +ZSH_THEME_GIT_PROMPT_UPSTREAM_SYMBOL="%{$fg_bold[yellow]%}^" +ZSH_THEME_GIT_PROMPT_UPSTREAM_PREFIX="%{$fg[red]%}(%{$fg[yellow]%}" +ZSH_THEME_GIT_PROMPT_UPSTREAM_SUFFIX="%{$fg[red]%})" +ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg[red]%}v" +ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg[green]%}^" +ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[red]%}x" +ZSH_THEME_GIT_PROMPT_STAGED="%{$fg[green]%}o" +ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg[red]%}+" +ZSH_THEME_GIT_PROMPT_UNTRACKED=".." +ZSH_THEME_GIT_PROMPT_STASHED="%{$fg[blue]%}$" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}>" + +PROMPT='%B%40<..<%~%b$(gitprompt)' +PROMPT+='%(?.%(!.%F{yellow}.%F{green})>%f.%F{red}>%f) ' +RPROMPT='' diff --git a/.config/shell/git-prompt_examples/bashgitprompt.zsh b/.config/shell/git-prompt_examples/bashgitprompt.zsh new file mode 100644 index 0000000..0e2018f --- /dev/null +++ b/.config/shell/git-prompt_examples/bashgitprompt.zsh @@ -0,0 +1,28 @@ +# Name: [bash-git-prompt](https://github.com/magicmonty/bash-git-prompt) clone +# Description: +# This example mimics the [bash-git-prompt](https://github.com/magicmonty/bash-git-prompt) +# informative git prompt for bash. + +ZSH_GIT_PROMPT_FORCE_BLANK=1 +ZSH_GIT_PROMPT_SHOW_STASH=1 +ZSH_GIT_PROMPT_SHOW_UPSTREAM="symbol" + +ZSH_THEME_GIT_PROMPT_PREFIX="%B %b[" +ZSH_THEME_GIT_PROMPT_SUFFIX="]" +ZSH_THEME_GIT_PROMPT_SEPARATOR="|" +ZSH_THEME_GIT_PROMPT_BRANCH="%{$fg[magenta]%}" +ZSH_THEME_GIT_PROMPT_UPSTREAM_SYMBOL=" %{$fg_bold[yellow]%}ā³ " +ZSH_THEME_GIT_PROMPT_UPSTREAM_PREFIX="%{$fg[yellow]%} ⤳ " +ZSH_THEME_GIT_PROMPT_UPSTREAM_SUFFIX="" +ZSH_THEME_GIT_PROMPT_DETACHED="%{$fg_no_bold[cyan]%}:" +ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg_no_bold[cyan]%}ā" +ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg_no_bold[cyan]%}ā" +ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[red]%}ā" +ZSH_THEME_GIT_PROMPT_STAGED="%{$fg[green]%}ā" +ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg[red]%}ā" +ZSH_THEME_GIT_PROMPT_UNTRACKED="ā¦" +ZSH_THEME_GIT_PROMPT_STASHED="%{$fg[blue]%}ā" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}ā" + +PROMPT=$'%(?..%F{red}%?%f Ā· )%F{yellow}%B%~%b%F{white}$(gitprompt)\n%D{%H:%M} $ ' +RPROMPT='' diff --git a/.config/shell/git-prompt_examples/compact.zsh b/.config/shell/git-prompt_examples/compact.zsh new file mode 100644 index 0000000..13a9336 --- /dev/null +++ b/.config/shell/git-prompt_examples/compact.zsh @@ -0,0 +1,24 @@ +# Name: Compact + +ZSH_GIT_PROMPT_SHOW_UPSTREAM="no" + +ZSH_THEME_GIT_PROMPT_PREFIX=" " +ZSH_THEME_GIT_PROMPT_SUFFIX="" +ZSH_THEME_GIT_PROMPT_SEPARATOR="|" +ZSH_THEME_GIT_PROMPT_DETACHED="%{$fg_bold[cyan]%}:" +ZSH_THEME_GIT_PROMPT_BRANCH="%{$fg_bold[magenta]%}" +ZSH_THEME_GIT_PROMPT_UPSTREAM_SYMBOL="%{$fg_bold[yellow]%}ā³ " +ZSH_THEME_GIT_PROMPT_UPSTREAM_PREFIX="%{$fg[red]%}(%{$fg[yellow]%}" +ZSH_THEME_GIT_PROMPT_UPSTREAM_SUFFIX="%{$fg[red]%})" +ZSH_THEME_GIT_PROMPT_BEHIND="ā" +ZSH_THEME_GIT_PROMPT_AHEAD="ā" +ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[red]%}ā" +ZSH_THEME_GIT_PROMPT_STAGED="%{$fg[green]%}ā" +ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg[red]%}ā" +ZSH_THEME_GIT_PROMPT_UNTRACKED="ā¦" +ZSH_THEME_GIT_PROMPT_STASHED="%{$fg[blue]%}ā" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}ā" + +PROMPT='%B%40<..<%~%b$(gitprompt)' +PROMPT+='%(?.%(!.%F{yellow}.%F{green}).%F{red})āÆ%f ' +RPROMPT='' diff --git a/.config/shell/git-prompt_examples/default.zsh b/.config/shell/git-prompt_examples/default.zsh new file mode 100644 index 0000000..d7a3721 --- /dev/null +++ b/.config/shell/git-prompt_examples/default.zsh @@ -0,0 +1,25 @@ +# Name: Default +# Description: Same as shown in [screenshot.svg](../screenshot.svg). + +ZSH_GIT_PROMPT_SHOW_UPSTREAM="no" + +ZSH_THEME_GIT_PROMPT_PREFIX="[" +ZSH_THEME_GIT_PROMPT_SUFFIX="] " +ZSH_THEME_GIT_PROMPT_SEPARATOR="|" +ZSH_THEME_GIT_PROMPT_DETACHED="%{$fg_bold[cyan]%}:" +ZSH_THEME_GIT_PROMPT_BRANCH="%{$fg_bold[magenta]%}" +ZSH_THEME_GIT_PROMPT_UPSTREAM_SYMBOL="%{$fg_bold[yellow]%}ā³ " +ZSH_THEME_GIT_PROMPT_UPSTREAM_PREFIX="%{$fg[red]%}(%{$fg[yellow]%}" +ZSH_THEME_GIT_PROMPT_UPSTREAM_SUFFIX="%{$fg[red]%})" +ZSH_THEME_GIT_PROMPT_BEHIND="ā" +ZSH_THEME_GIT_PROMPT_AHEAD="ā" +ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[red]%}ā" +ZSH_THEME_GIT_PROMPT_STAGED="%{$fg[green]%}ā" +ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg[red]%}ā" +ZSH_THEME_GIT_PROMPT_UNTRACKED="ā¦" +ZSH_THEME_GIT_PROMPT_STASHED="%{$fg[blue]%}ā" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}ā" + +PROMPT='%B%40<..<%~ %b$(gitprompt)' +PROMPT+='%(?.%(!.%F{white}āÆ%F{yellow}āÆ%F{red}.%F{blue}āÆ%F{cyan}āÆ%F{green})āÆ.%F{red}āÆāÆāÆ)%f ' +RPROMPT='' diff --git a/.config/shell/git-prompt_examples/kj_sh604.zsh b/.config/shell/git-prompt_examples/kj_sh604.zsh new file mode 100644 index 0000000..05bc937 --- /dev/null +++ b/.config/shell/git-prompt_examples/kj_sh604.zsh @@ -0,0 +1,70 @@ +# Name: [Pure](https://github.com/sindresorhus/pure) clone +# Description: +# This clone of the Pure prompt has support for Python virtualenvs, but none of the timing +# features or a vi mode. If you are using [fzf](https://github.com/junegunn/fzf), source the +# example after sourcing fzf's keybindings. +# +# If you want to try other examples again after sourcing the Pure example, you might have to +# restart your shell, because this prompt will always print a newline between prompts. + +ZSH_GIT_PROMPT_FORCE_BLANK=1 +ZSH_GIT_PROMPT_SHOW_UPSTREAM="yes" + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_no_bold[white]%}(" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg_no_bold[white]%}) " +ZSH_THEME_GIT_PROMPT_SEPARATOR=" " +ZSH_THEME_GIT_PROMPT_DETACHED="%{$fg_no_bold[cyan]%}:" +ZSH_THEME_GIT_PROMPT_BRANCH="%{$fg_no_bold[magenta]%}" +ZSH_THEME_GIT_PROMPT_UPSTREAM_SYMBOL="%{$fg_bold[yellow]%}^ " +ZSH_THEME_GIT_PROMPT_UPSTREAM_PREFIX="%{$fg[red]%}(%{$fg[yellow]%}" +ZSH_THEME_GIT_PROMPT_UPSTREAM_SUFFIX="%{$fg[red]%})" +ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg_no_bold[red]%}ā" +ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg_no_bold[red]%}ā" +ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[red]%}x" +ZSH_THEME_GIT_PROMPT_STAGED="%{$fg[yellow]%}ā¢" +ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg[blue]%}+" +ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[blue]%}U " +ZSH_THEME_GIT_PROMPT_STASHED="%{$fg[blue]%}ā" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}ā" + +# In the second line of the prompt $psvar[12] is read +PROMPT=$'%F{cyan}%~%f %F{242}$(gitprompt)%f%(12V.%F{242}%12v%f .)%(?.%F{white}.%F{red})%%%f ' + +setup() { + [[ -n $_PROMPT_INITIALIZED ]] && return + _PROMPT_INITIALIZED=1 + + # Prevent Python virtualenv from modifying the prompt + export VIRTUAL_ENV_DISABLE_PROMPT=1 + + # Set $psvar[12] to the current Python virtualenv + function _prompt_update_venv() { + psvar[12]= + if [[ -n $VIRTUAL_ENV ]] && [[ -n $VIRTUAL_ENV_DISABLE_PROMPT ]]; then + psvar[12]="${VIRTUAL_ENV:t}" + fi + } + add-zsh-hook precmd _prompt_update_venv + + # Draw a newline between every prompt + function _prompt_newline(){ + if [[ -z "$_PROMPT_NEWLINE" ]]; then + _PROMPT_NEWLINE=1 + elif [[ -n "$_PROMPT_NEWLINE" ]]; then + echo + fi + } + add-zsh-hook precmd _prompt_newline + + # To avoid glitching with fzf's alt+c binding we override the fzf-redraw-prompt widget. + # The widget by default reruns all precmd hooks, which prints the newline again. + # We therefore run all precmd hooks except _prompt_newline. + function fzf-redraw-prompt() { + local precmd + for precmd in ${precmd_functions:#_prompt_newline}; do + $precmd + done + zle reset-prompt + } +} +setup diff --git a/.config/shell/git-prompt_examples/multiline.zsh b/.config/shell/git-prompt_examples/multiline.zsh new file mode 100644 index 0000000..bc722a3 --- /dev/null +++ b/.config/shell/git-prompt_examples/multiline.zsh @@ -0,0 +1,24 @@ +# Name: Multi-line prompt + +ZSH_GIT_PROMPT_FORCE_BLANK=1 +ZSH_GIT_PROMPT_SHOW_UPSTREAM="full" + +ZSH_THEME_GIT_PROMPT_PREFIX="%B Ā· %b" +ZSH_THEME_GIT_PROMPT_SUFFIX="āŗ" +ZSH_THEME_GIT_PROMPT_SEPARATOR=" ā¹" +ZSH_THEME_GIT_PROMPT_BRANCH="ā %{$fg_bold[cyan]%}" +ZSH_THEME_GIT_PROMPT_UPSTREAM_SYMBOL="%{$fg_bold[yellow]%}ā³ " +ZSH_THEME_GIT_PROMPT_UPSTREAM_PREFIX="%{$fg[yellow]%} ⤳ " +ZSH_THEME_GIT_PROMPT_UPSTREAM_SUFFIX="" +ZSH_THEME_GIT_PROMPT_DETACHED="%{$fg_no_bold[cyan]%}:" +ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg_no_bold[cyan]%}ā" +ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg_no_bold[cyan]%}ā" +ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[red]%}ā" +ZSH_THEME_GIT_PROMPT_STAGED="%{$fg[green]%}ā" +ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg[red]%}ā" +ZSH_THEME_GIT_PROMPT_UNTRACKED="ā¦" +ZSH_THEME_GIT_PROMPT_STASHED="%{$fg[blue]%}ā" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}ā" + +PROMPT=$'āāø%(?..%F{red}%?%f Ā· )%B%~%b$(gitprompt)\nāāø%F{blue}āÆ%f%F{cyan}āÆ%f%F{green}āÆ%f ' +RPROMPT='' diff --git a/.config/shell/git-prompt_examples/pure.zsh b/.config/shell/git-prompt_examples/pure.zsh new file mode 100644 index 0000000..e71c7ab --- /dev/null +++ b/.config/shell/git-prompt_examples/pure.zsh @@ -0,0 +1,74 @@ +# Name: [Pure](https://github.com/sindresorhus/pure) clone +# Description: +# This clone of the Pure prompt has support for Python virtualenvs, but none of the timing +# features or a vi mode. If you are using [fzf](https://github.com/junegunn/fzf), source the +# example after sourcing fzf's keybindings. +# +# If you want to try other examples again after sourcing the Pure example, you might have to +# restart your shell, because this prompt will always print a newline between prompts. + +ZSH_GIT_PROMPT_FORCE_BLANK=1 +ZSH_GIT_PROMPT_SHOW_UPSTREAM="no" + +ZSH_THEME_GIT_PROMPT_PREFIX="" +ZSH_THEME_GIT_PROMPT_SUFFIX=" " +ZSH_THEME_GIT_PROMPT_SEPARATOR=" " +ZSH_THEME_GIT_PROMPT_DETACHED="%{$fg_no_bold[cyan]%}:" +ZSH_THEME_GIT_PROMPT_BRANCH="%{$fg_no_bold[grey]%}" +ZSH_THEME_GIT_PROMPT_UPSTREAM_SYMBOL="%{$fg_bold[yellow]%}ā³ " +ZSH_THEME_GIT_PROMPT_UPSTREAM_PREFIX="%{$fg[red]%}(%{$fg[yellow]%}" +ZSH_THEME_GIT_PROMPT_UPSTREAM_SUFFIX="%{$fg[red]%})" +ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg_no_bold[cyan]%}ā" +ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg_no_bold[cyan]%}ā" +ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[red]%}ā" +ZSH_THEME_GIT_PROMPT_STAGED="%{$fg[green]%}ā" +ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg[red]%}ā" +ZSH_THEME_GIT_PROMPT_UNTRACKED="ā¦" +ZSH_THEME_GIT_PROMPT_STASHED="%{$fg[blue]%}ā" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}ā" + +# In the second line of the prompt $psvar[12] is read +PROMPT=$'%F{blue}%~%f %F{242}$(gitprompt)%f +%(12V.%F{242}%12v%f .)%(?.%F{magenta}.%F{red})āÆ%f ' + +RPROMPT='' + + +setup() { + [[ -n $_PROMPT_INITIALIZED ]] && return + _PROMPT_INITIALIZED=1 + + # Prevent Python virtualenv from modifying the prompt + export VIRTUAL_ENV_DISABLE_PROMPT=1 + + # Set $psvar[12] to the current Python virtualenv + function _prompt_update_venv() { + psvar[12]= + if [[ -n $VIRTUAL_ENV ]] && [[ -n $VIRTUAL_ENV_DISABLE_PROMPT ]]; then + psvar[12]="${VIRTUAL_ENV:t}" + fi + } + add-zsh-hook precmd _prompt_update_venv + + # Draw a newline between every prompt + function _prompt_newline(){ + if [[ -z "$_PROMPT_NEWLINE" ]]; then + _PROMPT_NEWLINE=1 + elif [[ -n "$_PROMPT_NEWLINE" ]]; then + echo + fi + } + add-zsh-hook precmd _prompt_newline + + # To avoid glitching with fzf's alt+c binding we override the fzf-redraw-prompt widget. + # The widget by default reruns all precmd hooks, which prints the newline again. + # We therefore run all precmd hooks except _prompt_newline. + function fzf-redraw-prompt() { + local precmd + for precmd in ${precmd_functions:#_prompt_newline}; do + $precmd + done + zle reset-prompt + } +} +setup diff --git a/.config/shell/git-prompt_examples/rprompt.zsh b/.config/shell/git-prompt_examples/rprompt.zsh new file mode 100644 index 0000000..09d95b7 --- /dev/null +++ b/.config/shell/git-prompt_examples/rprompt.zsh @@ -0,0 +1,24 @@ +# Name: Git status on the right + +ZSH_GIT_PROMPT_FORCE_BLANK=1 +ZSH_GIT_PROMPT_SHOW_UPSTREAM="symbol" + +ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg_bold[default]%}āŗ " +ZSH_THEME_GIT_PROMPT_SUFFIX="" +ZSH_THEME_GIT_PROMPT_SEPARATOR=" " +ZSH_THEME_GIT_PROMPT_DETACHED="%{$fg_no_bold[cyan]%}:" +ZSH_THEME_GIT_PROMPT_BRANCH="%{$fg_no_bold[grey]%}" +ZSH_THEME_GIT_PROMPT_UPSTREAM_SYMBOL="%{$fg_bold[yellow]%}ā³ " +ZSH_THEME_GIT_PROMPT_UPSTREAM_PREFIX="%{$fg[red]%}(%{$fg[yellow]%}" +ZSH_THEME_GIT_PROMPT_UPSTREAM_SUFFIX="%{$fg[red]%})" +ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg_no_bold[cyan]%}ā" +ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg_no_bold[cyan]%}ā" +ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[red]%}ā" +ZSH_THEME_GIT_PROMPT_STAGED="%{$fg[green]%}ā" +ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg[red]%}ā" +ZSH_THEME_GIT_PROMPT_UNTRACKED="ā¦" +ZSH_THEME_GIT_PROMPT_STASHED="%{$fg[blue]%}ā" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}ā" + +PROMPT='%B%~%b %F{blue}ā»ā»ā»%f ' +RPROMPT='$(gitprompt)' diff --git a/.config/shell/git-prompt_examples/wprompt.zsh b/.config/shell/git-prompt_examples/wprompt.zsh new file mode 100644 index 0000000..b6232fa --- /dev/null +++ b/.config/shell/git-prompt_examples/wprompt.zsh @@ -0,0 +1,97 @@ +# Name: Woefe's prompt (wprompt) +# Description: +# The wprompt example is similar to the multi-line and Pure examples, but with optional +# [vi-mode](https://github.com/woefe/vi-mode.zsh) and the secondary prompt enabled. +# +# - Depends on [Font Awesome](https://fontawesome.com/) +# - Optionally depends on [vi-mode](https://github.com/woefe/vi-mode.zsh) +# - Source this example after fzf and after loading +# [vi-mode](https://github.com/woefe/vi-mode.zsh) +# +# If you want to try other examples again after sourcing this example, you might have to restart +# your shell, because this prompt will always print a newline between prompts. + +ZSH_GIT_PROMPT_FORCE_BLANK=1 +ZSH_GIT_PROMPT_ENABLE_SECONDARY=1 +ZSH_GIT_PROMPT_SHOW_UPSTREAM="notracking" + +ZSH_THEME_GIT_PROMPT_PREFIX=" Ā· " +ZSH_THEME_GIT_PROMPT_SUFFIX="" +ZSH_THEME_GIT_PROMPT_SEPARATOR=" Ā· " +ZSH_THEME_GIT_PROMPT_BRANCH="ā %{$fg_bold[cyan]%}" +ZSH_THEME_GIT_PROMPT_UPSTREAM_SYMBOL="%{$fg_bold[green]%}ļ” " +ZSH_THEME_GIT_PROMPT_UPSTREAM_NO_TRACKING="%{$fg_bold[red]%}!" +ZSH_THEME_GIT_PROMPT_UPSTREAM_PREFIX="%{$fg[red]%}(%{$fg[yellow]%}" +ZSH_THEME_GIT_PROMPT_UPSTREAM_SUFFIX="%{$fg[red]%})" +ZSH_THEME_GIT_PROMPT_DETACHED="@%{$fg_no_bold[cyan]%}" +ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg_no_bold[red]%}ā" +ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg_no_bold[green]%}ā" +ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[red]%}ā" +ZSH_THEME_GIT_PROMPT_STAGED="%{$fg[green]%}ā" +ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg[red]%}ā" +ZSH_THEME_GIT_PROMPT_UNTRACKED="ā¦" +ZSH_THEME_GIT_PROMPT_STASHED="%{$fg[blue]%}ā" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}ļ " +ZSH_THEME_GIT_PROMPT_TAGS_PREFIX=" Ā· ļ« " + +RPROMPT='' +PROMPT=$'āāø' +[ -n "$SSH_CLIENT" ] \ + && [ -n "$SSH_TTY" ] \ + && PROMPT+='%B%F{blue}@%m%f%b Ā· ' # Hostname, if in SSH session +PROMPT+='%B%30<..<%~%b%<<' # Path truncated to 30 characters +PROMPT+='%(12V. Ā· %F{244}ļ¢ %12v%f.)' # Python virtualenv name +PROMPT+='$(gitprompt)' # Git status +PROMPT+='$(gitprompt_secondary)' # Git status secondary info +PROMPT+=$'\nāāø' # Newline + +_WPROMPT_END='%(?.%(!.%F{white}āÆ%F{yellow}āÆ%F{red}.%F{blue}āÆ%F{cyan}āÆ%F{green})āÆ%f.%F{red}āÆāÆāÆ%f) ' +# Vi mode indicator, if github.com/woefe/vi-mode.zsh is loaded +if (( $+functions[vi_mode_status] )); then + VI_INSERT_MODE_INDICATOR=$_WPROMPT_END + VI_NORMAL_MODE_INDICATOR=${_WPROMPT_END//āÆ/ā¢} + + PROMPT+='$(vi_mode_status)' +else + PROMPT+=$_WPROMPT_END +fi + + +setup() { + [[ -n $_PROMPT_INITIALIZED ]] && return + _PROMPT_INITIALIZED=1 + + # Prevent Python virtualenv from modifying the prompt + export VIRTUAL_ENV_DISABLE_PROMPT=1 + + # Set $psvar[12] to the current Python virtualenv + function _prompt_update_venv() { + psvar[12]= + if [[ -n $VIRTUAL_ENV ]] && [[ -n $VIRTUAL_ENV_DISABLE_PROMPT ]]; then + psvar[12]="${VIRTUAL_ENV:t}" + fi + } + add-zsh-hook precmd _prompt_update_venv + + # Draw a newline between every prompt + function _prompt_newline(){ + if [[ -z "$_PROMPT_NEWLINE" ]]; then + _PROMPT_NEWLINE=1 + elif [[ -n "$_PROMPT_NEWLINE" ]]; then + echo + fi + } + add-zsh-hook precmd _prompt_newline + + # To avoid glitching with fzf's alt+c binding we override the fzf-redraw-prompt widget. + # The widget by default reruns all precmd hooks, which prints the newline again. + # We therefore run all precmd hooks except _prompt_newline. + function fzf-redraw-prompt() { + local precmd + for precmd in ${precmd_functions:#_prompt_newline}; do + $precmd + done + zle reset-prompt + } +} +setup |
