mirror of
https://github.com/sorin-ionescu/prezto.git
synced 2025-01-23 07:12:17 +08:00
Compare commits
7 Commits
dcb55e079a
...
ab37c21c97
Author | SHA1 | Date | |
---|---|---|---|
|
ab37c21c97 | ||
|
6e564503f1 | ||
|
427268c64f | ||
|
61d7dc9a72 | ||
|
2388b8f873 | ||
|
9626ce2beb | ||
|
5ea4b989b1 |
2
init.zsh
2
init.zsh
@ -173,7 +173,7 @@ if [[ -s "${ZDOTDIR:-$HOME}/.zpreztorc" ]]; then
|
||||
fi
|
||||
|
||||
# Disable color and theme in dumb terminals.
|
||||
if [[ "$TERM" == 'dumb' ]]; then
|
||||
if [[ $TERM == dumb ]]; then
|
||||
zstyle ':prezto:*:*' color 'no'
|
||||
zstyle ':prezto:module:prompt' theme 'off'
|
||||
fi
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit c3d4e576c9c86eac62884bd47c01f6faed043fc5
|
||||
Subproject commit e52ee8ca55bcc56a17c828767a3f98f22a68d4eb
|
@ -1 +1 @@
|
||||
Subproject commit 978e79e12c44b5b1d3e1e2920c537002087b82c2
|
||||
Subproject commit c160d09fddd28ceb3af5cf80e9253af80e450d96
|
@ -7,7 +7,7 @@
|
||||
#
|
||||
|
||||
# Return if requirements are not found.
|
||||
if [[ $TERM == 'dumb' ]]; then
|
||||
if [[ $TERM == dumb ]]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
# paste had a regression. Additionally, 5.2 added bracketed-paste-url-magic
|
||||
# which is generally better than url-quote-magic so we load that when possible.
|
||||
autoload -Uz is-at-least
|
||||
if [[ ${ZSH_VERSION} != 5.1.1 && ${TERM} != "dumb" ]]; then
|
||||
if [[ $ZSH_VERSION != 5.1.1 && $TERM != dumb ]]; then
|
||||
if is-at-least 5.2; then
|
||||
autoload -Uz bracketed-paste-url-magic
|
||||
zle -N bracketed-paste bracketed-paste-url-magic
|
||||
@ -34,7 +34,8 @@ setopt COMBINING_CHARS # Combine zero-length punctuation characters (accent
|
||||
# with the base character.
|
||||
setopt INTERACTIVE_COMMENTS # Enable comments in interactive shell.
|
||||
setopt RC_QUOTES # Allow 'Henry''s Garage' instead of 'Henry'\''s Garage'.
|
||||
unsetopt MAIL_WARNING # Don't print a warning message if a mail file has been accessed.
|
||||
unsetopt MAIL_WARNING # Don't print a warning message if a mail file has
|
||||
# been accessed.
|
||||
|
||||
# Allow mapping Ctrl+S and Ctrl+Q shortcuts
|
||||
[[ -r ${TTY:-} && -w ${TTY:-} && $+commands[stty] == 1 ]] && stty -ixon <$TTY >$TTY
|
||||
|
@ -149,6 +149,9 @@ function git-info {
|
||||
local dirty=0
|
||||
local dirty_format
|
||||
local dirty_formatted
|
||||
local error=0
|
||||
local error_format
|
||||
local error_formatted
|
||||
local ignore_submodules
|
||||
local indexed=0
|
||||
local indexed_format
|
||||
@ -361,6 +364,7 @@ function git-info {
|
||||
else
|
||||
# Use porcelain status for easy parsing.
|
||||
status_cmd="command git status --porcelain --ignore-submodules=${ignore_submodules:-none}"
|
||||
${(z)status_cmd} &> /dev/null || error=1
|
||||
|
||||
# Get current status.
|
||||
while IFS=$'\n' read line; do
|
||||
@ -426,6 +430,12 @@ function git-info {
|
||||
zstyle -s ':prezto:module:git:info:clean' format 'clean_formatted'
|
||||
fi
|
||||
|
||||
# Format error.
|
||||
if (( error > 0 )); then
|
||||
zstyle -s ':prezto:module:git:info:error' format 'error_format'
|
||||
zformat -f error_formatted "$error_format" "E:$error"
|
||||
fi
|
||||
|
||||
# Format info.
|
||||
zstyle -a ':prezto:module:git:info:keys' format 'info_formats'
|
||||
for info_format in ${(k)info_formats}; do
|
||||
@ -438,6 +448,7 @@ function git-info {
|
||||
"c:$commit_formatted" \
|
||||
"d:$deleted_formatted" \
|
||||
"D:$dirty_formatted" \
|
||||
"E:$error_formatted" \
|
||||
"i:$indexed_formatted" \
|
||||
"I:$unindexed_formatted" \
|
||||
"m:$modified_formatted" \
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 8dd05bfcc12b0cd1ee9ea64be725b3d9f713cf64
|
||||
Subproject commit 87ce96b1862928d84b1afe7c173316614b30e301
|
@ -7,7 +7,7 @@
|
||||
#
|
||||
|
||||
# Return if requirements are not found.
|
||||
if [[ "$TERM" == 'dumb' ]]; then
|
||||
if [[ $TERM == dumb ]]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
#
|
||||
|
||||
# Return if requirements are not found.
|
||||
if [[ "$TERM" == (dumb|linux|*bsd*|eterm*) ]]; then
|
||||
if [[ $TERM == (dumb|linux|*bsd*|eterm*) ]]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
@ -60,7 +60,7 @@ function _terminal-set-titles-with-command {
|
||||
local truncated_cmd="${cmd/(#m)?(#c15,)/${MATCH[1,12]}...}"
|
||||
unset MATCH
|
||||
|
||||
if [[ "$TERM" == screen* ]]; then
|
||||
if [[ $TERM == screen* ]]; then
|
||||
set-multiplexer-title "$truncated_cmd"
|
||||
fi
|
||||
set-tab-title "$truncated_cmd"
|
||||
@ -78,7 +78,7 @@ function _terminal-set-titles-with-path {
|
||||
local truncated_path="${abbreviated_path/(#m)?(#c15,)/...${MATCH[-12,-1]}}"
|
||||
unset MATCH
|
||||
|
||||
if [[ "$TERM" == screen* ]]; then
|
||||
if [[ $TERM == screen* ]]; then
|
||||
set-multiplexer-title "$truncated_path"
|
||||
fi
|
||||
set-tab-title "$truncated_path"
|
||||
@ -89,7 +89,7 @@ function _terminal-set-titles-with-path {
|
||||
autoload -Uz add-zsh-hook
|
||||
|
||||
# Set up the Apple Terminal.
|
||||
if [[ "$TERM_PROGRAM" == 'Apple_Terminal' ]] \
|
||||
if [[ $TERM_PROGRAM == Apple_Terminal ]] \
|
||||
&& ( ! [[ -n "$STY" || -n "$TMUX" || -n "$DVTM" ]] )
|
||||
then
|
||||
# Sets the Terminal.app current working directory before the prompt is
|
||||
|
@ -23,7 +23,7 @@ if ([[ "$TERM_PROGRAM" = 'iTerm.app' ]] && \
|
||||
_tmux_iterm_integration='-CC'
|
||||
fi
|
||||
|
||||
if [[ -z "$TMUX" && -z "$EMACS" && -z "$VIM" && -z "$INSIDE_EMACS" && "$TERM_PROGRAM" != "vscode" && "$TERMINAL_EMULATOR" != "JetBrains-JediTerm" ]] && ( \
|
||||
if [[ -z "$TMUX" && -z "$EMACS" && -z "$VIM" && -z "$INSIDE_EMACS" && -z "$VSCODE_RESOLVING_ENVIRONMENT" && "$TERM_PROGRAM" != "vscode" && "$TERMINAL_EMULATOR" != "JetBrains-JediTerm" ]] && ( \
|
||||
( [[ -n "$SSH_TTY" ]] && zstyle -t ':prezto:module:tmux:auto-start' remote ) ||
|
||||
( [[ -z "$SSH_TTY" ]] && zstyle -t ':prezto:module:tmux:auto-start' local ) \
|
||||
); then
|
||||
|
@ -14,6 +14,6 @@ SAYINGS=(
|
||||
)
|
||||
|
||||
# Print a randomly-chosen message:
|
||||
echo $SAYINGS[$(($RANDOM % ${#SAYINGS} + 1))]
|
||||
echo $SAYINGS[$(($RANDOM % $#SAYINGS + 1))]
|
||||
|
||||
} >&2
|
||||
|
Loading…
Reference in New Issue
Block a user