1
Fork 0
nixos-system-config/users/hu/packages/zsh/config/conf.d/suggestions.zsh
caem 75b13ac379
Refactor the entire configuration
With the release of the Nvidia 555 beta drivers and their improvements to
the Wayland experience I've finally decided to return to NixOS with
Hyprland again after 2 years of running Gentoo and Opensuse Tumbleweed
on X11. So this is me committing the work done so far from the last
couple of days. Future commits will be more incremental.
2024-05-24 21:33:00 +02:00

29 lines
757 B
Bash
Executable file

#!/usr/bin/env zsh
export HISTFILE=~/.cache/zsh_history
export HISTSIZE=10000
export SAVEHIST=$HISTSIZE
setopt INC_APPEND_HISTORY
setopt SHARE_HISTORY
setopt HIST_IGNORE_SPACE
setopt HIST_SAVE_NO_DUPS
if [ -z "$AUTOSUGGEST_FILE" ]; then
import_file="/usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh"
else
import_file="$AUTOSUGGEST_FILE"
fi
if [ ! -f "$import_file" ]; then
if [ ! -d "$HOME/.cache/zsh-autosuggestions" ]; then
echo "Installing zsh-autosuggestions..."
git clone "https://github.com/zsh-users/zsh-autosuggestions.git" "$HOME/.cache/zsh-autosuggestions"
fi
import_file="$HOME/.cache/zsh-autosuggestions/zsh-autosuggestions.zsh"
fi
source "$import_file"
ZSH_AUTOSUGGEST_STRATEGY=(history completion)