Fix ZSH history

This commit is contained in:
Fabio Scotto di Santolo
2025-08-18 14:47:28 +02:00
parent 49f492aac6
commit bd9143f8f1
2 changed files with 11 additions and 10 deletions

View File

@@ -22,6 +22,11 @@ export FZF_DEFAULT_OPTS=" \
--color=border:#313244,label:#CDD6F4" --color=border:#313244,label:#CDD6F4"
export FZF_TMUX_OPTS=" -p90%,70%" export FZF_TMUX_OPTS=" -p90%,70%"
case ":$PATH:" in
*":$HOME/.local/bin:"*) ;;
*) export PATH="$HOME/.local/bin:$PATH" ;;
esac
# Mise # Mise
if command -v mise >/dev/null 2>&1; then if command -v mise >/dev/null 2>&1; then
eval "$(mise activate zsh)" eval "$(mise activate zsh)"
@@ -33,6 +38,11 @@ if command -v go >/dev/null 2>&1; then
export GOBIN="$GOPATH/bin" export GOBIN="$GOPATH/bin"
fi fi
# Load cargo envs
if [ -e "$HOME/.cargo" ]; then
source "$HOME/.cargo/env"
fi
# Java # Java
if command -v java >/dev/null 2>&1; then if command -v java >/dev/null 2>&1; then
export JAVA_HOME="$(dirname $(mise bin-paths | grep -i java))" export JAVA_HOME="$(dirname $(mise bin-paths | grep -i java))"

View File

@@ -35,7 +35,7 @@ stty stop undef # disable accidental ctrl s
# history opts # history opts
HISTSIZE=1000000 HISTSIZE=1000000
SAVEHIST=1000000 SAVEHIST=1000000
# HISTFILE="$XDG_CACHE_HOME/zsh_history" # move histfile to cache HISTFILE="$XDG_CACHE_HOME/zsh_history" # move histfile to cache
HISTCONTROL=ignoreboth # consecutive duplicates & commands starting with space are not saved HISTCONTROL=ignoreboth # consecutive duplicates & commands starting with space are not saved
fpath=(~/.zsh $fpath) fpath=(~/.zsh $fpath)
@@ -98,15 +98,6 @@ alias userlist="cut -d: -f1 /etc/passwd | sort"
alias ip='ip -color' alias ip='ip -color'
alias stow='stow -d $DOTFILES ' alias stow='stow -d $DOTFILES '
case ":$PATH:" in
*":$HOME/.local/bin:"*) ;;
*) export PATH="$HOME/.local/bin:$PATH" ;;
esac
if [ -e "$HOME/.cargo" ]; then
source "$HOME/.cargo/env"
fi
if command -v tmux &> /dev/null && [ -z "$TMUX" ]; then if command -v tmux &> /dev/null && [ -z "$TMUX" ]; then
tmux attach-session -t default || tmux new-session -s default tmux attach-session -t default || tmux new-session -s default
fi fi