diff options
| author | Tslil Clingman <tslil.clingman@gmail.com> | 2017-05-28 17:32:03 -0500 |
|---|---|---|
| committer | Tslil Clingman <tslil.clingman@gmail.com> | 2017-05-28 17:32:03 -0500 |
| commit | 721668ea57fda4254ceee9146c6b6bee470b3fc6 (patch) | |
| tree | f0f7a8078c601d47dd521567749b215f9ca36373 /ratws | |
| parent | 6d1077a28b8d6f64ca72b9aa00f0b2cab97fb594 (diff) | |
Ran shellcheck, fixed (?) things
Diffstat (limited to 'ratws')
| -rwxr-xr-x | ratws | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -1,8 +1,10 @@ #!/usr/bin/env sh w=$(ratpoison -c windows) -#[ "$1" == "-s" ] && p="Tab" && w=$(echo "$w" | grep '(surf)') -#[ "$1" == "-w" ] && p="Windows" && w=$(echo "$w" | grep -v '(surf)') -[ -z $w ] && exit +[ "$1" = "-s" ] && p="Tab" && w=$(echo "$w" | grep '(surf)') +[ "$1" = "-w" ] && p="Windows" && w=$(echo "$w" | grep -v '(surf)') +[ -z "$w" ] && exit sel=$(echo "$w" | ratdm -p ${p:-All}' >' | cut -d ' ' -f 1) -[ -n $sel ] && ratpoison -c "select $sel" || true +if [ -n "$sel" ]; then + ratpoison -c "select $sel" +fi; |
