1
0
Fork 0
mirror of https://github.com/zdharma-continuum/zinit-configs.git synced 2025-01-31 04:08:16 +01:00
zinit-configs/NICHOLAS85/zinit/snippets/config/patches/per-directory-history.patch
vladislav doster 92f7b7ff82
maint: normalize configuration file names to be "zshrc" (#11)
Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
2022-06-04 07:40:14 -05:00

30 lines
1 KiB
Diff

Optimize
--- kadaan---per-directory-history/per-directory-history.zsh 2020-08-24 05:35:33.232756679 -0400
+++ kadaan---per-directory-history/per-directory-history-patch 2020-08-24 05:37:48.008288237 -0400
@@ -46,7 +46,7 @@
if ! $_per_directory_history_is_global
then
fc -P
- mkdir -p ${_per_directory_history_path:h}
+ [ -d ${_per_directory_history_path:h} ] || mkdir -p ${_per_directory_history_path:h}
fc -p $_per_directory_history_path
fi
}
@@ -73,7 +73,7 @@
local fn
if $_per_directory_history_is_global
then
- mkdir -p ${_per_directory_history_path:h}
+ [ -d ${_per_directory_history_path:h} ] || mkdir -p ${_per_directory_history_path:h}
fn=$_per_directory_history_path
else
fn=$_per_directory_history_main_histfile
@@ -96,7 +96,7 @@
function _per-directory-history-set-directory-history() {
fc -P
- mkdir -p ${_per_directory_history_path:h}
+ [ -d ${_per_directory_history_path:h} ] || mkdir -p ${_per_directory_history_path:h}
fc -p $_per_directory_history_path
_per_directory_history_is_global=false
}