diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2020-08-16 14:53:06 -0600 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2020-08-16 14:53:06 -0600 |
commit | f672613e98ba6b30728517b22c0e378557d7fb81 (patch) | |
tree | 40f71cbf5809d181129f812e6466eac0b7cb2509 | |
parent | 1edd2c43b12f9f2c2ef04cfa0428db0f7fc0aa7c (diff) | |
parent | 079e7bb5e0a79171f3356d55d3f6302a82645a39 (diff) | |
download | zsh-f672613e98ba6b30728517b22c0e378557d7fb81.tar.gz zsh-f672613e98ba6b30728517b22c0e378557d7fb81.tar.bz2 zsh-f672613e98ba6b30728517b22c0e378557d7fb81.zip |
Merge remote-tracking branch 'origin/master' into master
-rw-r--r-- | .github/ISSUE_TEMPLATE/config.yml | 5 | ||||
-rw-r--r-- | lib/cli.zsh | 11 | ||||
-rw-r--r-- | lib/completion.zsh | 11 | ||||
-rw-r--r-- | lib/functions.zsh | 4 | ||||
-rw-r--r-- | lib/key-bindings.zsh | 107 | ||||
-rw-r--r-- | plugins/colorize/README.md | 8 | ||||
-rw-r--r-- | plugins/colorize/colorize.plugin.zsh | 4 | ||||
-rw-r--r-- | plugins/pipenv/pipenv.plugin.zsh | 3 | ||||
-rw-r--r-- | plugins/pyenv/pyenv.plugin.zsh | 6 | ||||
-rw-r--r-- | plugins/rbenv/rbenv.plugin.zsh | 2 | ||||
-rw-r--r-- | plugins/wd/wd.sh | 14 | ||||
-rw-r--r-- | themes/arrow.zsh-theme | 2 | ||||
-rw-r--r-- | themes/awesomepanda.zsh-theme | 2 | ||||
-rw-r--r-- | themes/cloud.zsh-theme | 2 | ||||
-rw-r--r-- | themes/edvardm.zsh-theme | 2 | ||||
-rw-r--r-- | themes/fwalch.zsh-theme | 2 | ||||
-rw-r--r-- | themes/gozilla.zsh-theme | 2 | ||||
-rw-r--r-- | themes/jbergantine.zsh-theme | 2 | ||||
-rw-r--r-- | themes/jnrowe.zsh-theme | 2 | ||||
-rw-r--r-- | themes/jtriley.zsh-theme | 6 | ||||
-rw-r--r-- | themes/kafeitu.zsh-theme | 2 | ||||
-rw-r--r-- | themes/linuxonly.zsh-theme | 30 | ||||
-rw-r--r-- | themes/trapd00r.zsh-theme | 8 |
23 files changed, 146 insertions, 91 deletions
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000..c6b4cef42 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: true +contact_links: + - name: Get help on Discord + url: https://discord.gg/ohmyzsh + about: Have a quick question? Join the Discord server and ask on the appropriate channel. diff --git a/lib/cli.zsh b/lib/cli.zsh index 73ac5a846..3c09cdab8 100644 --- a/lib/cli.zsh +++ b/lib/cli.zsh @@ -23,6 +23,7 @@ function _omz { local -a cmds subcmds cmds=( 'help:Usage information' + 'update:Update Oh My Zsh' 'pr:Commands for Oh My Zsh Pull Requests' ) @@ -48,6 +49,7 @@ Usage: omz <command> [options] Available commands: help Print this help message + update Update Oh My Zsh pr <command> Commands for Oh My Zsh Pull Requests EOF @@ -197,3 +199,12 @@ function _omz::pr::test { } ) } + +function _omz::update { + env ZSH="$ZSH" sh "$ZSH/tools/upgrade.sh" + # Update last updated file + zmodload zsh/datetime + echo "LAST_EPOCH=$(( EPOCHSECONDS / 60 / 60 / 24 ))" >! "${ZSH_CACHE_DIR}/.zsh-update" + # Remove update lock if it exists + command rm -rf "$ZSH/log/update.lock" +} diff --git a/lib/completion.zsh b/lib/completion.zsh index 43927a277..2b62785d5 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -60,16 +60,15 @@ zstyle '*' single-ignored show if [[ $COMPLETION_WAITING_DOTS = true ]]; then expand-or-complete-with-dots() { - # toggle line-wrapping off and back on again - [[ -n "$terminfo[rmam]" && -n "$terminfo[smam]" ]] && echoti rmam - print -Pn "%{%F{red}......%f%}" - [[ -n "$terminfo[rmam]" && -n "$terminfo[smam]" ]] && echoti smam - + print -Pn "%F{red}…%f" zle expand-or-complete zle redisplay } zle -N expand-or-complete-with-dots - bindkey "^I" expand-or-complete-with-dots + # Set the function as the default tab completion widget + bindkey -M emacs "^I" expand-or-complete-with-dots + bindkey -M viins "^I" expand-or-complete-with-dots + bindkey -M vicmd "^I" expand-or-complete-with-dots fi # automatically load bash completion functions diff --git a/lib/functions.zsh b/lib/functions.zsh index 678e29ce7..e85b867a5 100644 --- a/lib/functions.zsh +++ b/lib/functions.zsh @@ -7,8 +7,8 @@ function uninstall_oh_my_zsh() { } function upgrade_oh_my_zsh() { - env ZSH="$ZSH" sh "$ZSH/tools/upgrade.sh" - command rm -rf "$ZSH/log/update.lock" + echo >&2 "${fg[yellow]}Note: \`$0\` is deprecated. Use \`omz update\` instead.$reset_color" + omz update } function take() { diff --git a/lib/key-bindings.zsh b/lib/key-bindings.zsh index 0e056dc72..aaa73046e 100644 --- a/lib/key-bindings.zsh +++ b/lib/key-bindings.zsh @@ -15,56 +15,101 @@ if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then zle -N zle-line-finish fi -bindkey -e # Use emacs key bindings +# Use emacs key bindings +bindkey -e -bindkey '\ew' kill-region # [Esc-w] - Kill from the cursor to the mark -bindkey -s '\el' 'ls\n' # [Esc-l] - run command: ls -bindkey '^r' history-incremental-search-backward # [Ctrl-r] - Search backward incrementally for a specified string. The string may begin with ^ to anchor the search to the beginning of the line. -if [[ "${terminfo[kpp]}" != "" ]]; then - bindkey "${terminfo[kpp]}" up-line-or-history # [PageUp] - Up a line of history +# [PageUp] - Up a line of history +if [[ -n "${terminfo[kpp]}" ]]; then + bindkey -M emacs "${terminfo[kpp]}" up-line-or-history + bindkey -M viins "${terminfo[kpp]}" up-line-or-history + bindkey -M vicmd "${terminfo[kpp]}" up-line-or-history fi -if [[ "${terminfo[knp]}" != "" ]]; then - bindkey "${terminfo[knp]}" down-line-or-history # [PageDown] - Down a line of history +# [PageDown] - Down a line of history +if [[ -n "${terminfo[knp]}" ]]; then + bindkey -M emacs "${terminfo[knp]}" down-line-or-history + bindkey -M viins "${terminfo[knp]}" down-line-or-history + bindkey -M vicmd "${terminfo[knp]}" down-line-or-history fi -# start typing + [Up-Arrow] - fuzzy find history forward -if [[ "${terminfo[kcuu1]}" != "" ]]; then +# Start typing + [Up-Arrow] - fuzzy find history forward +if [[ -n "${terminfo[kcuu1]}" ]]; then autoload -U up-line-or-beginning-search zle -N up-line-or-beginning-search - bindkey "${terminfo[kcuu1]}" up-line-or-beginning-search + + bindkey -M emacs "${terminfo[kcuu1]}" up-line-or-beginning-search + bindkey -M viins "${terminfo[kcuu1]}" up-line-or-beginning-search + bindkey -M vicmd "${terminfo[kcuu1]}" up-line-or-beginning-search fi -# start typing + [Down-Arrow] - fuzzy find history backward -if [[ "${terminfo[kcud1]}" != "" ]]; then +# Start typing + [Down-Arrow] - fuzzy find history backward +if [[ -n "${terminfo[kcud1]}" ]]; then autoload -U down-line-or-beginning-search zle -N down-line-or-beginning-search - bindkey "${terminfo[kcud1]}" down-line-or-beginning-search + + bindkey -M emacs "${terminfo[kcud1]}" down-line-or-beginning-search + bindkey -M viins "${terminfo[kcud1]}" down-line-or-beginning-search + bindkey -M vicmd "${terminfo[kcud1]}" down-line-or-beginning-search fi -if [[ "${terminfo[khome]}" != "" ]]; then - bindkey "${terminfo[khome]}" beginning-of-line # [Home] - Go to beginning of line +# [Home] - Go to beginning of line +if [[ -n "${terminfo[khome]}" ]]; then + bindkey -M emacs "${terminfo[khome]}" beginning-of-line + bindkey -M viins "${terminfo[khome]}" beginning-of-line + bindkey -M vicmd "${terminfo[khome]}" beginning-of-line fi -if [[ "${terminfo[kend]}" != "" ]]; then - bindkey "${terminfo[kend]}" end-of-line # [End] - Go to end of line +# [End] - Go to end of line +if [[ -n "${terminfo[kend]}" ]]; then + bindkey -M emacs "${terminfo[kend]}" end-of-line + bindkey -M viins "${terminfo[kend]}" end-of-line + bindkey -M vicmd "${terminfo[kend]}" end-of-line fi -bindkey ' ' magic-space # [Space] - do history expansion - -bindkey '^[[1;5C' forward-word # [Ctrl-RightArrow] - move forward one word -bindkey '^[[1;5D' backward-word # [Ctrl-LeftArrow] - move backward one word - -if [[ "${terminfo[kcbt]}" != "" ]]; then - bindkey "${terminfo[kcbt]}" reverse-menu-complete # [Shift-Tab] - move through the completion menu backwards +# [Shift-Tab] - move through the completion menu backwards +if [[ -n "${terminfo[kcbt]}" ]]; then + bindkey -M emacs "${terminfo[kcbt]}" reverse-menu-complete + bindkey -M viins "${terminfo[kcbt]}" reverse-menu-complete + bindkey -M vicmd "${terminfo[kcbt]}" reverse-menu-complete fi -bindkey '^?' backward-delete-char # [Backspace] - delete backward -if [[ "${terminfo[kdch1]}" != "" ]]; then - bindkey "${terminfo[kdch1]}" delete-char # [Delete] - delete forward +# [Backspace] - delete backward +bindkey -M emacs '^?' backward-delete-char +bindkey -M viins '^?' backward-delete-char +bindkey -M vicmd '^?' backward-delete-char +# [Delete] - delete forward +if [[ -n "${terminfo[kdch1]}" ]]; then + bindkey -M emacs "${terminfo[kdch1]}" delete-char + bindkey -M viins "${terminfo[kdch1]}" delete-char + bindkey -M vicmd "${terminfo[kdch1]}" delete-char else - bindkey "^[[3~" delete-char - bindkey "^[3;5~" delete-char - bindkey "\e[3~" delete-char + bindkey -M emacs "^[[3~" delete-char + bindkey -M viins "^[[3~" delete-char + bindkey -M vicmd "^[[3~" delete-char + + bindkey -M emacs "^[3;5~" delete-char + bindkey -M viins "^[3;5~" delete-char + bindkey -M vicmd "^[3;5~" delete-char fi +# [Ctrl-Delete] - delete whole forward-word +bindkey -M emacs '^[[3;5~' kill-word +bindkey -M viins '^[[3;5~' kill-word +bindkey -M vicmd '^[[3;5~' kill-word + +# [Ctrl-RightArrow] - move forward one word +bindkey -M emacs '^[[1;5C' forward-word +bindkey -M viins '^[[1;5C' forward-word +bindkey -M vicmd '^[[1;5C' forward-word +# [Ctrl-LeftArrow] - move backward one word +bindkey -M emacs '^[[1;5D' backward-word +bindkey -M viins '^[[1;5D' backward-word +bindkey -M vicmd '^[[1;5D' backward-word + + +bindkey '\ew' kill-region # [Esc-w] - Kill from the cursor to the mark +bindkey -s '\el' 'ls\n' # [Esc-l] - run command: ls +bindkey '^r' history-incremental-search-backward # [Ctrl-r] - Search backward incrementally for a specified string. The string may begin with ^ to anchor the search to the beginning of the line. +bindkey ' ' magic-space # [Space] - don't do history expansion + + # Edit the current command line in $EDITOR autoload -U edit-command-line zle -N edit-command-line diff --git a/plugins/colorize/README.md b/plugins/colorize/README.md index ee4ab8036..405bb6d39 100644 --- a/plugins/colorize/README.md +++ b/plugins/colorize/README.md @@ -38,6 +38,14 @@ Pygments offers multiple styles. By default, the `default` style is used, but yo ZSH_COLORIZE_STYLE="colorful" ``` +### Chroma Formatter Settings + +Chroma supports terminal output in 8 color, 256 color, and true-color. If you need to change the default terminal output style from the standard 8 color output, set the `ZSH_COLORIZE_CHROMA_FORMATTER` environment variable: + +``` +ZSH_COLORIZE_CHROMA_FORMATTER=terminal256 +``` + ## Usage * `ccat <file> [files]`: colorize the contents of the file (or files, if more than one are provided). diff --git a/plugins/colorize/colorize.plugin.zsh b/plugins/colorize/colorize.plugin.zsh index 6ed9739fa..80b69190f 100644 --- a/plugins/colorize/colorize.plugin.zsh +++ b/plugins/colorize/colorize.plugin.zsh @@ -46,7 +46,7 @@ colorize_cat() { if [[ "$ZSH_COLORIZE_TOOL" == "pygmentize" ]]; then pygmentize -O style="$ZSH_COLORIZE_STYLE" -g else - chroma --style="$ZSH_COLORIZE_STYLE" + chroma --style="$ZSH_COLORIZE_STYLE" --formatter="${ZSH_COLORIZE_CHROMA_FORMATTER:-terminal}" fi return $? fi @@ -62,7 +62,7 @@ colorize_cat() { pygmentize -O style="$ZSH_COLORIZE_STYLE" -g "$FNAME" fi else - chroma --style="$ZSH_COLORIZE_STYLE" "$FNAME" + chroma --style="$ZSH_COLORIZE_STYLE" --formatter="${ZSH_COLORIZE_CHROMA_FORMATTER:-terminal}" "$FNAME" fi done } diff --git a/plugins/pipenv/pipenv.plugin.zsh b/plugins/pipenv/pipenv.plugin.zsh index e7a9e6b3c..4be61a920 100644 --- a/plugins/pipenv/pipenv.plugin.zsh +++ b/plugins/pipenv/pipenv.plugin.zsh @@ -1,6 +1,6 @@ # Pipenv completion _pipenv() { - eval $(env COMMANDLINE="${words[1,$CURRENT]}" _PIPENV_COMPLETE=complete-zsh pipenv) + eval $(env COMMANDLINE="${words[1,$CURRENT]}" _PIPENV_COMPLETE=complete-zsh pipenv) } compdef _pipenv pipenv @@ -25,6 +25,7 @@ _togglePipenvShell() { } autoload -U add-zsh-hook add-zsh-hook chpwd _togglePipenvShell +_togglePipenvShell # Aliases alias pch="pipenv check" diff --git a/plugins/pyenv/pyenv.plugin.zsh b/plugins/pyenv/pyenv.plugin.zsh index 4c75156bd..b7ae2046f 100644 --- a/plugins/pyenv/pyenv.plugin.zsh +++ b/plugins/pyenv/pyenv.plugin.zsh @@ -2,7 +2,11 @@ # the 'pyenv_prompt_info' function. Also loads pyenv-virtualenv if available. # Load pyenv only if command not already available -command -v pyenv &> /dev/null && FOUND_PYENV=1 || FOUND_PYENV=0 +if command -v pyenv &> /dev/null && [[ "$(uname -r)" != *icrosoft* ]]; then + FOUND_PYENV=1 +else + FOUND_PYENV=0 +fi if [[ $FOUND_PYENV -ne 1 ]]; then pyenvdirs=("$HOME/.pyenv" "/usr/local/pyenv" "/opt/pyenv" "/usr/local/opt/pyenv") diff --git a/plugins/rbenv/rbenv.plugin.zsh b/plugins/rbenv/rbenv.plugin.zsh index 3c964320a..0f2d366e2 100644 --- a/plugins/rbenv/rbenv.plugin.zsh +++ b/plugins/rbenv/rbenv.plugin.zsh @@ -34,7 +34,7 @@ if [[ $FOUND_RBENV -eq 1 ]]; then } function current_gemset() { - echo "$(rbenv gemset active 2>/dev/null | sed -e ":a" -e '$ s/\n/+/gp;N;b a' | head -n1)" + echo "$(rbenv gemset active 2>/dev/null)" | tr ' ' '+' } function gems() { diff --git a/plugins/wd/wd.sh b/plugins/wd/wd.sh index 802ed10ee..618995c63 100644 --- a/plugins/wd/wd.sh +++ b/plugins/wd/wd.sh @@ -183,6 +183,11 @@ wd_add() then wd_remove $point > /dev/null printf "%q:%s\n" "${point}" "${PWD/#$HOME/~}" >> $WD_CONFIG + if (whence sort >/dev/null); then + local config_tmp=$(mktemp "${TMPDIR:-/tmp}/wd.XXXXXXXXXX") + # use 'cat' below to ensure we respect $WD_CONFIG as a symlink + sort -o "${config_tmp}" $WD_CONFIG && cat "${config_tmp}" > $WD_CONFIG && rm "${config_tmp}" + fi wd_export_static_named_directories @@ -342,8 +347,8 @@ wd_clean() { wd_export_static_named_directories() { if [[ -z $WD_SKIP_EXPORT ]] then - grep '^[0-9a-zA-Z_-]\+:' "$WD_CONFIG" | sed -e "s,~,$HOME," -e 's/:/=/' | while read warpdir ; do - hash -d "$warpdir" + command grep '^[0-9a-zA-Z_-]\+:' "$WD_CONFIG" | sed -e "s,~,$HOME," -e 's/:/=/' | while read warpdir ; do + hash -d "$warpdir" done fi } @@ -430,7 +435,10 @@ else break ;; "-r"|"--remove"|"rm") - wd_remove $2 + # Loop over all arguments after "rm", separated by whitespace + for pointname in "${@:2}" ; do + wd_remove $pointname + done break ;; "-l"|"list") diff --git a/themes/arrow.zsh-theme b/themes/arrow.zsh-theme index a3e77d65d..76c031fd2 100644 --- a/themes/arrow.zsh-theme +++ b/themes/arrow.zsh-theme @@ -1,7 +1,7 @@ if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="yellow"; fi PROMPT='%{$fg[$NCOLOR]%}%c ➤ %{$reset_color%}' -RPROMPT='%{$fg[$NCOLOR]%}%p $(git_prompt_info)%{$reset_color%}' +RPROMPT='%{$fg[$NCOLOR]%} $(git_prompt_info)%{$reset_color%}' ZSH_THEME_GIT_PROMPT_PREFIX="git:" ZSH_THEME_GIT_PROMPT_SUFFIX="" diff --git a/themes/awesomepanda.zsh-theme b/themes/awesomepanda.zsh-theme index 1c5d06b2d..85036e4ac 100644 --- a/themes/awesomepanda.zsh-theme +++ b/themes/awesomepanda.zsh-theme @@ -1,6 +1,6 @@ # the svn plugin has to be activated for this to work. local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)" -PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}$(svn_prompt_info)%{$reset_color%}' +PROMPT='${ret_status}%{$fg_bold[green]%} %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}$(svn_prompt_info)%{$reset_color%}' ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" diff --git a/themes/cloud.zsh-theme b/themes/cloud.zsh-theme index 59a3472b6..e26f786e1 100644 --- a/themes/cloud.zsh-theme +++ b/themes/cloud.zsh-theme @@ -2,7 +2,7 @@ if [[ -z $ZSH_THEME_CLOUD_PREFIX ]]; then ZSH_THEME_CLOUD_PREFIX='☁' fi -PROMPT='%{$fg_bold[cyan]%}$ZSH_THEME_CLOUD_PREFIX %{$fg_bold[green]%}%p %{$fg[green]%}%c %{$fg_bold[cyan]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' +PROMPT='%{$fg_bold[cyan]%}$ZSH_THEME_CLOUD_PREFIX %{$fg_bold[green]%} %{$fg[green]%}%c %{$fg_bold[cyan]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}[%{$fg[cyan]%}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" diff --git a/themes/edvardm.zsh-theme b/themes/edvardm.zsh-theme index f9ca1a9e2..d41dd4434 100644 --- a/themes/edvardm.zsh-theme +++ b/themes/edvardm.zsh-theme @@ -1,4 +1,4 @@ -PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg_bold[white]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' +PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%} %{$fg_bold[white]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" diff --git a/themes/fwalch.zsh-theme b/themes/fwalch.zsh-theme index 24edf55c0..33f851c9d 100644 --- a/themes/fwalch.zsh-theme +++ b/themes/fwalch.zsh-theme @@ -1,4 +1,4 @@ -PROMPT='%{$fg_bold[green]%}%p %{$fg[cyan]%}%c%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' +PROMPT='%{$fg_bold[green]%} %{$fg[cyan]%}%c%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' ZSH_THEME_GIT_PROMPT_PREFIX=" (%{$fg[red]%}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" diff --git a/themes/gozilla.zsh-theme b/themes/gozilla.zsh-theme index c6b752e9b..593b8ec35 100644 --- a/themes/gozilla.zsh-theme +++ b/themes/gozilla.zsh-theme @@ -1,4 +1,4 @@ -PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' +PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%} %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' ZSH_THEME_GIT_PROMPT_PREFIX="(" ZSH_THEME_GIT_PROMPT_SUFFIX=")" diff --git a/themes/jbergantine.zsh-theme b/themes/jbergantine.zsh-theme index d84247cff..8e9a8ee95 100644 --- a/themes/jbergantine.zsh-theme +++ b/themes/jbergantine.zsh-theme @@ -1,4 +1,4 @@ -PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[white]%}$(git_prompt_info)%{$fg_bold[white]%} % %{$reset_color%}' +PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%} %{$fg[cyan]%}%c %{$fg_bold[white]%}$(git_prompt_info)%{$fg_bold[white]%} % %{$reset_color%}' ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" diff --git a/themes/jnrowe.zsh-theme b/themes/jnrowe.zsh-theme index bae88f7ab..9d8fb2488 100644 --- a/themes/jnrowe.zsh-theme +++ b/themes/jnrowe.zsh-theme @@ -33,6 +33,6 @@ function { local ret_status="%(?:%{$fg_bold[green]%}Ξ:%{$fg_bold[red]%}%S↑%s%?)" -PROMPT='${ret_status}%{$fg[blue]%}${PROMPT_HOST}%{$fg_bold[green]%}%p %{$fg_bold[yellow]%}%2~ ${vcs_info_msg_0_}${dir_status}%{$reset_color%} ' +PROMPT='${ret_status}%{$fg[blue]%}${PROMPT_HOST}%{$fg_bold[green]%} %{$fg_bold[yellow]%}%2~ ${vcs_info_msg_0_}${dir_status}%{$reset_color%} ' # vim: set ft=zsh ts=4 sw=4 et: diff --git a/themes/jtriley.zsh-theme b/themes/jtriley.zsh-theme index 15d77ed23..0f5b16f0a 100644 --- a/themes/jtriley.zsh-theme +++ b/themes/jtriley.zsh-theme @@ -1,8 +1,2 @@ -#PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' PROMPT="%{$fg_bold[cyan]%}%T%{$fg_bold[green]%} %{$fg_bold[white]%}%n%{$fg[magenta]%}@%{$fg_bold[white]%}%m %{$fg_bold[green]%}%d %{$fg_bold[yellow]%}%% %{$reset_color%}" - -#ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" -#ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" -#ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}" -#ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" diff --git a/themes/kafeitu.zsh-theme b/themes/kafeitu.zsh-theme index c4720b24d..af96f5e38 100644 --- a/themes/kafeitu.zsh-theme +++ b/themes/kafeitu.zsh-theme @@ -1,4 +1,4 @@ -PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%n%{$fg[cyan]%}@%{$fg_bold[green]%}%m %{$fg_bold[green]%}%p %{$fg[cyan]%}%~ %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' +PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%n%{$fg[cyan]%}@%{$fg_bold[green]%}%m %{$fg_bold[green]%} %{$fg[cyan]%}%~ %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" diff --git a/themes/linuxonly.zsh-theme b/themes/linuxonly.zsh-theme index f9e0aa07d..2afae8fc3 100644 --- a/themes/linuxonly.zsh-theme +++ b/themes/linuxonly.zsh-theme @@ -1,7 +1,6 @@ -# vim: set ts=2 textwidth=0 - autoload -U add-zsh-hook autoload -Uz vcs_info + local c0=$(printf "\033[0m") local c1=$(printf "\033[38;5;215m") local c2=$(printf "\033[38;5;209m") @@ -13,7 +12,6 @@ local c7=$(printf "\033[38;5;149m") local c8=$(printf "\033[38;5;126m") local c9=$(printf "\033[38;5;162m") - if [ "$TERM" = "linux" ]; then c1=$(printf "\033[34;1m") c2=$(printf "\033[35m") @@ -26,9 +24,6 @@ if [ "$TERM" = "linux" ]; then c9=$(printf "\033[34m") fi -#local newtv=$(perl $HOME/devel/newtv.pl) -local newtv='' - zstyle ':vcs_info:*' actionformats \ '%{$c8%}(%f%s)%{$c7%}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f ' zstyle ':vcs_info:*' formats \ @@ -42,38 +37,23 @@ prompt_jnrowe_precmd () { vcs_info if [ "${vcs_info_msg_0_}" = "" ]; then - #dir_status="|%F{3}%n%F{7}@%F{3}%m%F{7}:%F{9}%l%f" - #dir_status="$c1%n%F{7}@%F{9}%m%F{7}:%F{12}%/" dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})" - #dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$foopath%} %{$c0%}(%{$c5%}%?%{$c0%})" - - PROMPT='%{$fg_bold[green]%}%p%{$reset_color%}${vcs_info_msg_0_}${dir_status} ${ret_status}%{$reset_color%} + PROMPT='${dir_status} ${ret_status}%{$reset_color%} > ' elif [[ $(git diff --cached --name-status 2>/dev/null ) != "" ]]; then dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})" PROMPT='${vcs_info_msg_0_} -%{$fg_bold[green]%}%p%{$reset_color%}${dir_status} ${vcs_info_msg_0_}%{$reset_color%} +${dir_status} ${vcs_info_msg_0_}%{$reset_color%} > ' - elif [[ $(git diff --name-status 2>/dev/null ) != "" ]]; then dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})" - PROMPT='${vcs_info_msg_0_} -%{$fg_bold[green]%}%p%{$reset_color%}${dir_status}%{$reset_color%} +${dir_status}%{$reset_color%} %{$c9%}·>%{$c0%} ' else dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})" PROMPT='${vcs_info_msg_0_} -%{$fg_bold[green]%}%p%{$reset_color%}${dir_status} ${vcs_info_msg_0_}%{$reset_color%} +${dir_status} ${vcs_info_msg_0_}%{$reset_color%} > ' - fi } - - -#PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$reset_color%} ${vcs_info_msg_0_}${dir_status}%{$reset_color%} -#> ' - -# vim: set ft=zsh ts=4 sw=4 et: - - diff --git a/themes/trapd00r.zsh-theme b/themes/trapd00r.zsh-theme index 144d2549a..7a589a699 100644 --- a/themes/trapd00r.zsh-theme +++ b/themes/trapd00r.zsh-theme @@ -109,23 +109,23 @@ prompt_jnrowe_precmd () { vcs_info if [ "${vcs_info_msg_0_}" = "" ]; then dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$(zsh_path)%} %{$c0%}(%{$c5%}%?%{$c0%})" - PROMPT='%{$fg_bold[green]%}%p%{$reset_color%}${vcs_info_msg_0_}${dir_status} ${ret_status}%{$reset_color%} + PROMPT='${dir_status} ${ret_status}%{$reset_color%} > ' # modified, to be committed elif [[ $(git diff --cached --name-status 2>/dev/null ) != "" ]]; then dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$(zsh_path)%} %{$c0%}(%{$c5%}%?%{$c0%})" PROMPT='${vcs_info_msg_0_}%{$30%} %{$bg_bold[red]%}%{$fg_bold[cyan]%}C%{$fg_bold[black]%}OMMIT%{$reset_color%} -%{$fg_bold[green]%}%p%{$reset_color%}${dir_status}%{$reset_color%} +${dir_status}%{$reset_color%} > ' elif [[ $(git diff --name-status 2>/dev/null ) != "" ]]; then dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$(zsh_path)%} %{$c0%}(%{$c5%}%?%{$c0%})" PROMPT='${vcs_info_msg_0_}%{$bg_bold[red]%}%{$fg_bold[blue]%}D%{$fg_bold[black]%}IRTY%{$reset_color%} -%{$fg_bold[green]%}%p%{$reset_color%}${dir_status}%{$reset_color%} +${dir_status}%{$reset_color%} %{$c13%}>%{$c0%} ' else dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$(zsh_path)%} %{$c0%}(%{$c5%}%?%{$c0%})" PROMPT='${vcs_info_msg_0_} -%{$fg_bold[green]%}%p%{$reset_color%}${dir_status}%{$reset_color%} +${dir_status}%{$reset_color%} > ' fi } |