Overide some clompletions

master
Jonathan Hodgson 11 months ago
parent be4fbe17c3
commit 1da86fb3a5
  1. 16
      shells/zsh/includes/overidepartialcompletion.zsh

@ -58,8 +58,24 @@ overidecomplete(){
-m|--hash-type) toadd="$( hashcat --example-hashes | grep -E '(mode|Example\.Hash\.\.|Name|^$)' | awk -F ': ' '{print $NF}' | sed 's/Hash mode #//' | awk -v RS="\n\n" -F="\t" '{gsub("\n","\t",$0);print $0}' | fzf -d "\t" --header="Mode Type" --with-nth='1,2' --preview='echo {3}' --preview-window=up:1 --height=40% | cut -d' ' -f1)"
ret=0
;;
-r|--rules-file) toadd="$( fd -a --type f --hidden --follow --color=always . /usr/share/wordlist-rules/ | fzf --preview 'bat {}' | cut -d' ' -f1)"
ret=0
;;
esac
;;
#http|https)
# toadd="$(echo "GET example.com/api/endpoint_1\nGET example.com/api/endpoint_2\nGET example.com/api/endpoint_3\nPOST example.com/api/endpoint_3\n" | fzf)"
# ret=0
openvpn)
toadd="/etc/openvpn/client/$(pacman -Ql openvpn-protonvpn | cut -d '/' -f 5 | fzf)"
ret=0
;;
kill)
toadd="$(grc --colour=on ps -ef | fzf --header-lines 1 --ansi --no-preview -m | awk '{print $2}' | tr '\n' ' ')"
ret=0
;;
esac
fi

Loading…
Cancel
Save