From bad9ee00042cc7f63f5271646d31e531a9e8c48c Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Tue, 27 Oct 2020 10:33:21 +0100 Subject: lib: delete zsh session history list NOTE: it still lives somewhere in the current zsh process. Run `fc -P` to restore it. --- lib/history.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/history.zsh b/lib/history.zsh index 8d922a30b..1f0f3cc24 100644 --- a/lib/history.zsh +++ b/lib/history.zsh @@ -6,7 +6,8 @@ function omz_history { if [[ -n "$clear" ]]; then # if -c provided, clobber the history file echo -n >| "$HISTFILE" - echo >&2 History file deleted. Reload the session to see its effects. + fc -p "$HISTFILE" + echo >&2 History file deleted. elif [[ -n "$list" ]]; then # if -l provided, run as if calling `fc' directly builtin fc "$@" -- cgit v1.2.3-70-g09d2 From 28ed2880c766eb5a360354fb71d597dbc07abaa0 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Mon, 9 Nov 2020 12:00:06 +0100 Subject: Revert "lib: remove share_history" This reverts commit 23760228908d14a4644718869d5ebfb7b0dde6a7. Fixes #9430 --- lib/history.zsh | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/history.zsh b/lib/history.zsh index 1f0f3cc24..794076904 100644 --- a/lib/history.zsh +++ b/lib/history.zsh @@ -37,3 +37,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 share_history # share command history data -- cgit v1.2.3-70-g09d2 From a3e0f4f2afe03a207b98d4c0aaecb5bbaa796883 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Mon, 9 Nov 2020 18:33:59 +0100 Subject: fix(lib): make opts local in omz_urlencode to fix scoping bug Fixes error message when using zplug, due to $opts having been declared as an associative array: omz_urlencode:2: bad set of key/value pairs for associative array Fixes #9429 --- lib/functions.zsh | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/functions.zsh b/lib/functions.zsh index 58f0e3fb0..15526cd5f 100644 --- a/lib/functions.zsh +++ b/lib/functions.zsh @@ -134,6 +134,7 @@ zmodload zsh/langinfo # -P causes spaces to be encoded as '%20' instead of '+' function omz_urlencode() { emulate -L zsh + local -a opts zparseopts -D -E -a opts r m P local in_str=$1 -- cgit v1.2.3-70-g09d2