Improve loading of fzf completions

This commit is contained in:
Jonny Barnes 2024-07-07 14:29:58 +01:00
parent 95153292ea
commit a2bf3fc412
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8
3 changed files with 10 additions and 14 deletions

View file

@ -0,0 +1,12 @@
#!/usr/bin/env zsh
# cURL completions copied from https://blog.revathskumar.com/2024/02/curl-fuzzy-search-options-using-fzf.html
_fzf_complete_curl() {
_fzf_complete --header-lines=1 --prompt="curl> " -- "$@" < <(
curl -h all
)
}
_fzf_complete_curl_post() {
awk '{print $1}' | cut -d ',' -f -1
}

View file

@ -1,6 +0,0 @@
#!/usr/bin/env zsh
# Setup fzf completions
if (( ${+commands[fzf]} )); then
eval "$(fzf --zsh)"
fi