dotfiles

My configuration files.
Log | Files | Refs | README

commit ed3e1ec66fbe04b6ea9e44590da649abb29370b4
parent 97b3136138b0bd2209d7250aa9d432f2837116ca
Author: Sven Möller <sven-moeller@outlook.de>
Date:   Sat, 18 Dec 2021 22:49:49 +0100

Add while loop

Diffstat:
Mbin/.local/bin/bm | 18++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/bin/.local/bin/bm b/bin/.local/bin/bm @@ -47,15 +47,17 @@ open () { interactive () { list="$1" - line="$(list "$list" | fzf | awk '{print $1}')" - if [ -z "$line" ]; then exit; fi actions="open\narchive\nfavorite\nunread\ndelete\n" - action="$(printf "$actions" | grep -v "$list" | fzf)" - if [ -z "$action" ]; then exit; fi - case "$action" in - unread|favorite|archive) move "$line" "$list" "$action" ;; - open|delete) "$action" "$line" "$list" ;; - esac + while :; do + line="$(list "$list" | fzf | awk '{print $1}')" + if [ -z "$line" ]; then exit; fi + action="$(printf "$actions" | grep -v "$list" | fzf)" + if [ -z "$action" ]; then exit; fi + case "$action" in + unread|favorite|archive) move "$line" "$list" "$action" ;; + open|delete) "$action" "$line" "$list" ;; + esac + done } sync () {