add some bash-history functions

This commit is contained in:
Jakobus Schürz 2020-02-12 12:21:26 +01:00
parent f56d785dbf
commit 8d7d52aee2
2 changed files with 7 additions and 1 deletions

View file

@ -5,6 +5,10 @@
alias fuck='sudo $(history -p \!\!)' alias fuck='sudo $(history -p \!\!)'
alias wosis='which $(history -p \!\!)' alias wosis='which $(history -p \!\!)'
alias fix='reset; stty sane; tput rs1; clear; echo -e "\033c"' # Fix terminal aber binary output alias fix='reset; stty sane; tput rs1; clear; echo -e "\033c"' # Fix terminal aber binary output
# Source https://www.digitalocean.com/community/tutorials/how-to-use-bash-history-commands-and-expansions-on-a-linux-vps
alias vilastcatfile='vim $(history -p \!cat:$:t)'
alias vio='vim $(history -p \!less:$:t)'
alias cdlastfiledir='cd $(history -p \!\!:$:h)'

View file

@ -123,7 +123,9 @@ fi
# unset ARCHIVPATH ARCHIVSUBPATH # unset ARCHIVPATH ARCHIVSUBPATH
#fi #fi
# Disable Ctrl+s to freeze terminal
# Source https://www.digitalocean.com/community/tutorials/how-to-use-bash-history-commands-and-expansions-on-a-linux-vps
stty -ixon
echo "bashrc_add sourced" 2>&1 |tee -a ${MYSHELLCONFIG_LOGFILE} >&2 echo "bashrc_add sourced" 2>&1 |tee -a ${MYSHELLCONFIG_LOGFILE} >&2
#echo "bashrc_add sourced" >&2 #echo "bashrc_add sourced" >&2