From c89725370f7575606908f274e5f51f6c8dadc670 Mon Sep 17 00:00:00 2001 From: tomit4 Date: Tue, 3 May 2022 17:28:29 -0700 Subject: [PATCH] reworked home command to clear history depending on which shell i'm in --- aliases | 1 - bashrc.txt | 1 + zshrc.txt | 7 +++++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/aliases b/aliases index 494a95f3..dcd73821 100644 --- a/aliases +++ b/aliases @@ -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" diff --git a/bashrc.txt b/bashrc.txt index 37cd70fd..9de8f4fe 100644 --- a/bashrc.txt +++ b/bashrc.txt @@ -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 diff --git a/zshrc.txt b/zshrc.txt index a09c5599..ac90252d 100644 --- a/zshrc.txt +++ b/zshrc.txt @@ -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