mirror of
https://github.com/gotbletu/shownotes
synced 2024-11-10 19:10:36 +00:00
14 lines
501 B
Bash
Executable File
14 lines
501 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# AUTHOR: gotbletu (@gmail|twitter|youtube|github|lbry)
|
|
# https://www.youtube.com/user/gotbletu
|
|
# DESC: copy textblock to clipboard
|
|
# DEMO: https://www.youtube.com/watch?v=Zew0mgJwAh8
|
|
# DEPEND: fzf sed coreutils findutils (xsel or tmux)
|
|
|
|
selected="$(find ~/.multisnippet/ -type f | sort | fzf -e -i --reverse --delimiter / --with-nth -1 --preview 'cat {}')"
|
|
[ -z "$selected" ] && exit
|
|
|
|
# add to tmux and X11 clipboard
|
|
xsel -b < "$selected"
|
|
tmux load-buffer "$selected"
|