From da8c19a076a3d1cbd5b77928ce69c0705e1de8d7 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Mon, 11 May 2020 12:11:02 +0200 Subject: core: fix zstyle definition of use-cache --- lib/completion.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/completion.zsh b/lib/completion.zsh index 8b87557a2..43927a277 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -41,8 +41,8 @@ fi zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories # Use caching so that commands like apt and dpkg complete are useable -zstyle ':completion::complete:*' use-cache 1 -zstyle ':completion::complete:*' cache-path $ZSH_CACHE_DIR +zstyle ':completion:*' use-cache yes +zstyle ':completion:*' cache-path $ZSH_CACHE_DIR # Don't complete uninteresting users zstyle ':completion:*:*:*:users' ignored-patterns \ -- cgit v1.2.3-70-g09d2 From cbd6fbe7a7c3ef260f497704092dc43f2e953c3f Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Sat, 16 May 2020 17:17:38 +0200 Subject: core: enable hist_reduce_blanks Fixes #8722 --- lib/history.zsh | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/history.zsh b/lib/history.zsh index 52e45bf4c..0ac587d38 100644 --- a/lib/history.zsh +++ b/lib/history.zsh @@ -35,6 +35,7 @@ setopt extended_history # record timestamp of command in HISTFILE setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE setopt hist_ignore_dups # ignore duplicated commands history list setopt hist_ignore_space # ignore commands that start with space +setopt hist_reduce_blanks # remove superfluous blanks from commands added to history setopt hist_verify # show command with history expansion to user before running it setopt inc_append_history # add commands to HISTFILE in order of execution setopt share_history # share command history data -- cgit v1.2.3-70-g09d2 From 582c8cb2915bf898a419cfcff398af1966211c25 Mon Sep 17 00:00:00 2001 From: Jacob Menke Date: Wed, 20 May 2020 05:30:11 -0400 Subject: Prefix cd calls with `builtin` (#8937) --- lib/cli.zsh | 8 ++++---- lib/diagnostics.zsh | 8 ++++---- oh-my-zsh.sh | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'lib') diff --git a/lib/cli.zsh b/lib/cli.zsh index 8c0fabb82..e25a9f0b1 100644 --- a/lib/cli.zsh +++ b/lib/cli.zsh @@ -103,7 +103,7 @@ EOF function _omz::pr::clean { ( set -e - cd -q "$ZSH" + builtin cd -q "$ZSH" _omz::log info "removing all Oh My Zsh Pull Request branches..." command git branch --list 'ohmyzsh/pull-*' | while read branch; do @@ -126,7 +126,7 @@ function _omz::pr::test { # Save current git HEAD local branch - branch=$(cd -q "$ZSH"; git symbolic-ref --short HEAD) || { + branch=$(builtin cd -q "$ZSH"; git symbolic-ref --short HEAD) || { _omz::log error "error when getting the current git branch. Aborting..." return 1 } @@ -136,7 +136,7 @@ function _omz::pr::test { # If any of these operations fail, undo the changes made ( set -e - cd -q "$ZSH" + builtin cd -q "$ZSH" # Get the ohmyzsh git remote command git remote -v | while read remote url _; do @@ -185,7 +185,7 @@ function _omz::pr::test { ( set -e - cd -q "$ZSH" + builtin cd -q "$ZSH" command git checkout "$branch" -- || { _omz::log error "could not go back to the previous branch ('$branch')." diff --git a/lib/diagnostics.zsh b/lib/diagnostics.zsh index 9c9905e4d..001de42b7 100644 --- a/lib/diagnostics.zsh +++ b/lib/diagnostics.zsh @@ -192,19 +192,19 @@ function _omz_diag_dump_one_big_text() { command ls -ld ~/.oh* builtin echo builtin echo oh-my-zsh git state: - (cd $ZSH && builtin echo "HEAD: $(git rev-parse HEAD)" && git remote -v && git status | command grep "[^[:space:]]") + (builtin cd $ZSH && builtin echo "HEAD: $(git rev-parse HEAD)" && git remote -v && git status | command grep "[^[:space:]]") if [[ $verbose -ge 1 ]]; then - (cd $ZSH && git reflog --date=default | command grep pull) + (builtin cd $ZSH && git reflog --date=default | command grep pull) fi builtin echo if [[ -e $ZSH_CUSTOM ]]; then local custom_dir=$ZSH_CUSTOM if [[ -h $custom_dir ]]; then - custom_dir=$(cd $custom_dir && pwd -P) + custom_dir=$(builtin cd $custom_dir && pwd -P) fi builtin echo "oh-my-zsh custom dir:" builtin echo " $ZSH_CUSTOM ($custom_dir)" - (cd ${custom_dir:h} && command find ${custom_dir:t} -name .git -prune -o -print) + (builtin cd ${custom_dir:h} && command find ${custom_dir:t} -name .git -prune -o -print) builtin echo fi diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index 6c61725cd..435febc6d 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -63,7 +63,7 @@ fi # Construct zcompdump OMZ metadata zcompdump_metadata="\ -#omz revision: $(cd -q "$ZSH"; git rev-parse HEAD 2>/dev/null) +#omz revision: $(builtin cd -q "$ZSH"; git rev-parse HEAD 2>/dev/null) #omz fpath: $fpath\ " -- cgit v1.2.3-70-g09d2 From cfdd3c8dd87cd22281ec5d964ecb915bc9ad7e92 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Wed, 20 May 2020 14:02:42 +0200 Subject: Revert "core: enable hist_reduce_blanks" This reverts commit cbd6fbe7a7c3ef260f497704092dc43f2e953c3f. Fixes #8949 --- lib/history.zsh | 1 - 1 file changed, 1 deletion(-) (limited to 'lib') diff --git a/lib/history.zsh b/lib/history.zsh index 0ac587d38..52e45bf4c 100644 --- a/lib/history.zsh +++ b/lib/history.zsh @@ -35,7 +35,6 @@ setopt extended_history # record timestamp of command in HISTFILE setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE setopt hist_ignore_dups # ignore duplicated commands history list setopt hist_ignore_space # ignore commands that start with space -setopt hist_reduce_blanks # remove superfluous blanks from commands added to history setopt hist_verify # show command with history expansion to user before running it setopt inc_append_history # add commands to HISTFILE in order of execution setopt share_history # share command history data -- cgit v1.2.3-70-g09d2 From fcd0747bc123d2c0775f8d757f0135067905ac0d Mon Sep 17 00:00:00 2001 From: Benoit GALATI Date: Thu, 21 May 2020 18:29:00 +0200 Subject: core: remove inc_append_history option (#8048) --- lib/history.zsh | 1 - 1 file changed, 1 deletion(-) (limited to 'lib') diff --git a/lib/history.zsh b/lib/history.zsh index 52e45bf4c..0f04de215 100644 --- a/lib/history.zsh +++ b/lib/history.zsh @@ -36,5 +36,4 @@ setopt hist_expire_dups_first # delete duplicates first when HISTFILE size excee setopt hist_ignore_dups # ignore duplicated commands history list setopt hist_ignore_space # ignore commands that start with space setopt hist_verify # show command with history expansion to user before running it -setopt inc_append_history # add commands to HISTFILE in order of execution setopt share_history # share command history data -- cgit v1.2.3-70-g09d2