buku-fzf function, dmenu with history

This commit is contained in:
2019-08-18 03:13:32 -04:00
parent a1b3fd43f9
commit 704fb6665c
11 changed files with 201 additions and 29 deletions

View File

@@ -0,0 +1,12 @@
function buku-fzf
# buku -p -f 5 | awk -F '\t' 'BEGIN { OFS=FS }; { $2=substr($2, 1, 90); print }' | column -t -s (printf '\t') | fzf --multi | awk '{ print $1 }'
if test $argv[1] = "fq"
set ids (buku -t fq -f4 | awk -F '\t' 'BEGIN { OFS=FS }; { sub(/https?:\/\/(www\.)?/, "", $2); $2=substr($2, 1, 45); $3=substr($3, 1, 50); print }' | column -t -s (printf '\t') | fzf --multi --tiebreak end | awk '{ print $1 }')
else
set ids (buku -p -f4 | awk -F '\t' 'BEGIN { OFS=FS }; { sub(/https?:\/\/(www\.)?/, "", $2); $2=substr($2, 1, 45); $3=substr($3, 1, 45); print }' | column -t -s (printf '\t') | fzf --multi --tiebreak end | awk '{ print $1 }')
end
for id in $ids
buku -o $id
end
end

View File

@@ -0,0 +1,7 @@
function sudo
if test "$argv" = !!
eval command sudo $history[1]
else
command sudo $argv
end
end