shithub: rc

Download patch

ref: 592eeaea689ecedb955ea3d240194528e052f278
parent: 789a742be505cac0fee6b437e49cea431004f6e3
author: qwx <qwx@sciops.net>
date: Sat May 14 06:41:10 EDT 2022

fn: change venerable play/shp behavior: affect last process rather than first

this ends up being the most frequent use in practice, whenever
there are multiple play(1)ers

--- a/fn
+++ b/fn
@@ -16,9 +16,9 @@
 # resume playback
 fn sta{ for(i in `{fpl}) echo 'echo start >/proc/'^$i^/ctl }
 # shortcuts for first play(1) process
-fn Fw{ fw | sed 1q | rc }
-fn Sta{ sta | sed 1q | rc }
-fn Sto{ sto | sed 1q | rc }
+fn Fw{ fw | tail -1 | rc }
+fn Sta{ sta | tail -1 | rc }
+fn Sto{ sto | tail -1 | rc }
 # recursively list all files in arguments and play shuffled list forever
 fn shp{ *=`"{walk -f $*}; while(! ~ $#* 0) play `'
 '{echo -n $* | shl} |[2] sed -u '/^COVERART/d'}