5119
Lh
lazy-history / files
lazy-history / scripts / install-zsh.sh
823 bytes
1#! /bin/zsh 2 3# set shell options to print commands as they are executed 4set -e 5 6# Install the lazy-history command using go install 7echo "Installing lazy-history" 8go install github.com/sacenox/lazy-history@latest 9 10# Add the lazy-history command to the PATH if it's not already there 11echo "Adding lazy-history to PATH" 12if ! echo "$PATH" | grep -q "$HOME/go/bin"; then 13 export PATH="$PATH:$HOME/go/bin" 14fi 15 16# TODO: Uncomment this when we have a way to add query with the tui 17# Get the directory where this script is located 18#SCRIPT_DIR="$(cd "$(dirname "${(%):-%x}")" && pwd)" 19 20# Source the rc.sh file from the same directory as this script 21# into the zsh rc file 22#echo "adding rc-zsh.sh to ~/.zshrc" 23#cat "$SCRIPT_DIR/rc-zsh.sh" >> ~/.zshrc 24 25echo "Done! Please restart your shell.\nOr source the ~/.zshrc file directly."