1
0
mirror of https://github.com/dcarrillo/dotfiles.git synced 2024-12-22 17:28:01 +00:00

[.zshrc] Add new remove_from_history function and reformat the file

This commit is contained in:
Daniel Carrillo 2023-08-29 18:20:42 +02:00
parent a735266834
commit ed3e082f1c
Signed by: dcarrillo
GPG Key ID: E4CD5C09DAED6E16

9
.zshrc
View File

@ -47,6 +47,7 @@ alias issh='kitty +kitten ssh'
alias ls='ls --group-directories-first --color=auto --hyperlink=auto' alias ls='ls --group-directories-first --color=auto --hyperlink=auto'
alias bkpwd='rm -rf ${PWD}.bak ; cp -a $PWD{,.bak}' alias bkpwd='rm -rf ${PWD}.bak ; cp -a $PWD{,.bak}'
alias rgh="rg --hidden -g '!.git/'" alias rgh="rg --hidden -g '!.git/'"
alias fdh='fd --hidden --exclude .git'
alias vim=nvim alias vim=nvim
alias neovim=nvim alias neovim=nvim
alias disable-hl='ZSH_HIGHLIGHT_MAXLENGTH=0' alias disable-hl='ZSH_HIGHLIGHT_MAXLENGTH=0'
@ -88,6 +89,10 @@ siteinfo () {
httpx -silent -json -follow-redirects -ip -tech-detect -target "$url" | jq -rc '.tech' httpx -silent -json -follow-redirects -ip -tech-detect -target "$url" | jq -rc '.tech'
} }
remove_from_hist() {
LC_ALL=C sed -i "/$1/d" $HISTFILE
}
##### tilix ##### ##### tilix #####
if [ $TILIX_ID ] || [ $VTE_VERSION ] ; then if [ $TILIX_ID ] || [ $VTE_VERSION ] ; then
@ -121,8 +126,8 @@ fzf-file-widget-hidden () {
export FZF_DEFAULT_COMMAND="fd --type file --follow" export FZF_DEFAULT_COMMAND="fd --type file --follow"
export FZF_DEFAULT_OPTS="-m --reverse \ export FZF_DEFAULT_OPTS="-m --reverse \
--color 'info:#00AAFF,prompt:#FFFFFF,pointer:#00AAFF,hl:#1AE51A,hl+:#1AE51A' \ --color 'info:#00AAFF,prompt:#FFFFFF,pointer:#00AAFF,hl:#1AE51A,hl+:#1AE51A' \
--tabstop=4 \ --tabstop=4"
--bind 'ctrl-o:execute(xdg-open {})+abort,ctrl-e:execute({})+abort,ctrl-y:execute(echo {} | xclip -selection clipboard -in)+abort'" # --bind 'ctrl-o:execute(xdg-open {})+abort,ctrl-e:execute({})+abort,ctrl-y:execute(echo {} | xclip -selection clipboard -in)+abort'"
export FZF_CTRL_T_OPTS="--no-height --preview '[[ \$(file --mime {}) =~ binary ]] && echo {} is a binary file || pygmentize {} 2> /dev/null | head -500'" export FZF_CTRL_T_OPTS="--no-height --preview '[[ \$(file --mime {}) =~ binary ]] && echo {} is a binary file || pygmentize {} 2> /dev/null | head -500'"
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"