Fix tramp creating random files
This commit is contained in:
parent
1af11843ad
commit
645a6858b6
17
init.zsh
17
init.zsh
@ -55,8 +55,23 @@ unsetopt beep notify
|
|||||||
|
|
||||||
# Some general, random configuration
|
# Some general, random configuration
|
||||||
# History stuff
|
# History stuff
|
||||||
|
if [[ -v INSIDE_EMACS ]]; then
|
||||||
|
() {
|
||||||
|
emulate -L zsh
|
||||||
|
set -o rematchpcre
|
||||||
|
if [[ "${HISTFILE}" =~ '^~([^/]*)($|/.*)' ]]; then
|
||||||
|
local user="${match[1]}"
|
||||||
|
local rest="${match[2]}"
|
||||||
|
if [[ -z "${user}" ]]; then
|
||||||
|
HISTFILE="${HOME}${rest}"
|
||||||
|
else
|
||||||
|
HISTFILE="${userdirs[${user}]}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
[[ "${HISTFILE}" == '~'* ]] && HISTFILE="${HISTFILE}"
|
||||||
[ -v HISTFILE ] || HISTFILE="${HOME}/.cache/zsh/history"
|
[ -v HISTFILE ] || HISTFILE="${HOME}/.cache/zsh/history"
|
||||||
[ ! -d "${HISTFILE:h}" ] && mkdir -p "${HISTFILE:h}"
|
|
||||||
HISTSIZE=1000
|
HISTSIZE=1000
|
||||||
SAVEHIST=10000
|
SAVEHIST=10000
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user