mirror of
https://github.com/FliegendeWurst/tmux-thumbs.git
synced 2024-11-22 12:54:59 +00:00
Fix multi regexp
This commit is contained in:
parent
9b1a759756
commit
7bc0310762
@ -3,7 +3,7 @@
|
||||
source ~/.bash_profile
|
||||
|
||||
function boolean {
|
||||
VALUE=$(tmux show -v @thumbs-$1 2> /dev/null)
|
||||
VALUE=$(tmux show -vg @thumbs-$1 2> /dev/null)
|
||||
|
||||
if [[ "${VALUE}" == "1" ]]; then
|
||||
echo "--$1"
|
||||
@ -11,7 +11,7 @@ function boolean {
|
||||
}
|
||||
|
||||
function option {
|
||||
VALUE=$(tmux show -v @thumbs-$1 2> /dev/null)
|
||||
VALUE=$(tmux show -vg @thumbs-$1 2> /dev/null)
|
||||
|
||||
if [[ ${VALUE} ]]; then
|
||||
echo "--$1 ${VALUE}"
|
||||
@ -21,9 +21,10 @@ function option {
|
||||
function multi {
|
||||
VALUES=""
|
||||
|
||||
while read -r VALUE; do
|
||||
while read -r ITEM_KEY; do
|
||||
VALUE=$(tmux show -vg $ITEM_KEY 2> /dev/null)
|
||||
VALUES="${VALUES} --$1 ${VALUE}"
|
||||
done < <(tmux show 2> /dev/null | grep thumbs-$1- | cut -d' ' -f2 | sed s/\"//g)
|
||||
done < <(tmux show -g 2> /dev/null | grep thumbs-$1- | cut -d' ' -f1)
|
||||
|
||||
echo ${VALUES}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user