reworked home command to clear history depending on which shell i'm in

This commit is contained in:
tomit4 2022-05-03 17:28:29 -07:00
parent 97d8c42ab6
commit c89725370f
3 changed files with 6 additions and 3 deletions

View file

@ -11,7 +11,6 @@ alias dmesg="doas dmesg -H"
alias blkid="doas blkid"
alias kernel="uname -r"
alias .="cd"
alias home="xclear && cd /home/brian && clear && erase_history && hash -r"
alias docs="cd ~/Documents"
alias down="cd ~/Downloads"
alias pics="cd ~/Pictures"

View file

@ -185,5 +185,6 @@ export GREP_COLORS='ms=01;34'
if test -n "$KITTY_INSTALLATION_DIR" -a -e "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash"; then source "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash"; fi
# END_KITTY_SHELL_INTEGRATION
alias home="xclear && cd /home/brian && clear && history -c && hash -r"
source ~/.aliases
source /home/brian/.bash_completions/typer.sh

View file

@ -3,6 +3,7 @@
# to change default shell, use chsh -s $(which zsh)
#
# create custom env variables:
#
export cproj="/home/brian/Documents/Code/forks/"
# custom BROWSER env for ddgr:
export BROWSER=links
@ -70,8 +71,9 @@ unsetopt BEEP
PROMPT='%B%F{blue}[%n@%M %B%F{white}'%1~'%B%F{blue}]$ %B%F{white}${vcs_info_msg_0_}%B%F{blue}
└─▶%B%F{white} '
function erase_history { local HISTSIZE=0; }
erase_history && hash -r
# function erase_history { local HISTSIZE=0; }
# erase_history && hash -r
# Set up vim mode
bindkey -v
@ -83,6 +85,7 @@ bindkey -v
# kitty-integration
# unfunction kitty-integration
# fi
alias home="xclear && cd /home/brian && clear && history -p && hash -r"
source ~/.aliases
# Plugins (that need to be at the end of the zshrc script)
source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh