alias grep='rg' alias find='fd' # make rm, cp and mv safer alias rm='rm -i' alias cp='cp -i' alias mv='mv -i' # misc aliases alias termbin="nc termbin.com 9999" alias ktheme='kitty +kitten themes --reload-in=all' alias wget='wget --hsts-file="$XDG_DATA_HOME"/wget-hsts' if (( ${+commands[nvim]} )); then alias vim="nvim"; fi # gdb stuff alias peda="gdb -iex 'source /usr/share/peda/peda.py' --nh -q" alias gef="gdb -iex 'source /usr/share/gef/gef.py' --nh -q" alias pwndbg="gdb -iex 'source /usr/share/pwndbg/gdbinit.py' --nh -q" # add previous command to pet function prev() { PREV=$(fc -lrn | head -n 1) sh -c "pet new `printf %q "$PREV"`" } # select from pet snippets function petselect() { BUFFER=$(pet search --query "$LBUFFER") CURSOR=$#BUFFER zle redisplay } zle -N petselect bindkey '^s' petselect # ranger as cli file manager function runranger() { echo ranger < $TTY zle redisplay } zle -N runranger bindkey '^f' runranger function ss() { command grc --colour=auto ss "$@" } function gi() { curl -sLw "\n" "https://www.toptal.com/developers/gitignore/api/$@" } function findfile() { local search if test "$1" = "--update"; then sudo updatedb shift search=$1 else search=$1 fi locate "$PWD*$search*" }