ZSH: adds aws key regex to currenWordCompletions
This commit is contained in:
parent
7240fbc402
commit
98a1d5177a
2 changed files with 24 additions and 1 deletions
|
@ -20,7 +20,11 @@ regexSelect(){
|
||||||
|
|
||||||
echo -ne "URLs\t"
|
echo -ne "URLs\t"
|
||||||
echo -n 'https?://[^\"\\'"'"'> ]+'
|
echo -n 'https?://[^\"\\'"'"'> ]+'
|
||||||
echo -ne "\tRequires extended regex -E in grep"
|
echo -e "\tRequires extended regex -E in grep"
|
||||||
|
|
||||||
|
echo -ne "AWS Keys\t"
|
||||||
|
echo -n '([^A-Z0-9]|^)(AKIA|A3T|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{12,}'
|
||||||
|
echo -e "\tRequires extended regex -E in grep"
|
||||||
|
|
||||||
) | column -t -s $'\t' | fzf --preview-window top:1 --preview 'echo {3}' --delimiter ' +' --header-lines 1 --with-nth 1,2 | awk -F ' +' '{print "\"" $2 "\""}'
|
) | column -t -s $'\t' | fzf --preview-window top:1 --preview 'echo {3}' --delimiter ' +' --header-lines 1 --with-nth 1,2 | awk -F ' +' '{print "\"" $2 "\""}'
|
||||||
}
|
}
|
||||||
|
|
19
shells/zsh/includes/navi.zsh
Normal file
19
shells/zsh/includes/navi.zsh
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
|
#_call_navi() {
|
||||||
|
# local selected
|
||||||
|
# if [ -n "$LBUFFER" ]; then
|
||||||
|
# if selected="$(printf "%s" "$(navi --print --fzf-overrides '--no-select-1' --query "${LBUFFER}" </dev/tty)")"; then
|
||||||
|
# LBUFFER="$selected"
|
||||||
|
# fi
|
||||||
|
# else
|
||||||
|
# if selected="$(printf "%s" "$(navi --print </dev/tty)")"; then
|
||||||
|
# LBUFFER="$selected"
|
||||||
|
# fi
|
||||||
|
# fi
|
||||||
|
# zle redisplay
|
||||||
|
#}
|
||||||
|
#
|
||||||
|
#zle -N _call_navi
|
||||||
|
#
|
||||||
|
#bindkey '^n' _call_navi
|
Loading…
Add table
Add a link
Reference in a new issue