mirror of
https://github.com/TECHNOFAB11/tmux-copyrat.git
synced 2025-12-12 16:10:07 +01:00
chore: a new start
This commit is contained in:
commit
34d0bb5a35
21 changed files with 2319 additions and 0 deletions
28
tmux-thumbs.sh
Executable file
28
tmux-thumbs.sh
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
[ -f ~/.bash_profile ] && source ~/.bash_profile
|
||||
|
||||
PARAMS=()
|
||||
|
||||
function add-option-param {
|
||||
VALUE=$(tmux show -vg @thumbs-$1 2> /dev/null)
|
||||
|
||||
if [[ ${VALUE} ]]; then
|
||||
PARAMS+=("--$1=${VALUE}")
|
||||
fi
|
||||
}
|
||||
|
||||
add-option-param "command"
|
||||
add-option-param "upcase-command"
|
||||
|
||||
# Remove empty arguments from PARAMS.
|
||||
# Otherwise, they would choke up tmux-thumbs when passed to it.
|
||||
for i in "${!PARAMS[@]}"; do
|
||||
[ -n "${PARAMS[$i]}" ] || unset "PARAMS[$i]"
|
||||
done
|
||||
|
||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
${CURRENT_DIR}/target/release/tmux-thumbs --dir "${CURRENT_DIR}" "${PARAMS[@]}"
|
||||
|
||||
true
|
||||
Loading…
Add table
Add a link
Reference in a new issue