diff --git a/dot_config/zsh/dot_zsh_plugins.txt b/dot_config/zsh/dot_zsh_plugins.txt index 51ccb1c..b67bf66 100644 --- a/dot_config/zsh/dot_zsh_plugins.txt +++ b/dot_config/zsh/dot_zsh_plugins.txt @@ -13,7 +13,7 @@ trapd00r/LS_COLORS 3v1n0/zsh-bash-completions-fallback mroth/evalcache QuarticCat/zsh-smartcache -zpm-zsh/colorize +unixorn/warhol.plugin.zsh twopizza9621536/zsh-eza fdellwing/zsh-bat amyreese/zsh-titles diff --git a/dot_config/zsh/files/aliases.zsh b/dot_config/zsh/files/aliases.zsh index 3f0c27a..d23562c 100644 --- a/dot_config/zsh/files/aliases.zsh +++ b/dot_config/zsh/files/aliases.zsh @@ -1,6 +1,3 @@ -# temp fix for eza -alias ls='eza -F -gh --group-directories-first --git --git-ignore --icons --color-scale all --hyperlink' - alias grep='rg' alias find='fd' @@ -20,6 +17,21 @@ 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 pet-select() { + BUFFER=$(pet search --query "$LBUFFER") + CURSOR=$#BUFFER + zle redisplay +} +zle -N pet-select +bindkey '^s' pet-select + # ranger as cli file manager run_ranger () { echo @@ -28,3 +40,11 @@ run_ranger () { } zle -N run_ranger bindkey '^f' run_ranger + +function ss() { + command grc --colour=auto ss "$@" +} + +function gi() { + curl -sLw "\n" "https://www.toptal.com/developers/gitignore/api/$@" +} diff --git a/dot_local/bin/executable_joke b/dot_local/bin/executable_joke index 248c9fa..d8502e7 100644 --- a/dot_local/bin/executable_joke +++ b/dot_local/bin/executable_joke @@ -17,4 +17,8 @@ case "$1" in echo -n "Daily Hackerquote: " awk 'NR=='$((1 + RANDOM % $lines ))'{print;exit}' "$file" ;; +"fact") + echo "Daily Facts:" + curl -s 'https://randomfactgenerator.net/' | awk -v RS='' '/