diff options
author | Alex Musolino <alex@musolino.id.au> | 2018-06-18 13:11:03 +0930 |
---|---|---|
committer | Alex Musolino <alex@musolino.id.au> | 2018-06-18 13:11:03 +0930 |
commit | 1de2698dc824b995781c8525e85b4445d0648a04 (patch) | |
tree | 31060eea31f813d2e1d752da53cd9120cc4ad5c0 /rc | |
parent | 583c6d269b4589be4d3b711b56ccf51d89414215 (diff) | |
download | plan9front-1de2698dc824b995781c8525e85b4445d0648a04.tar.xz |
play(1): handle file names containing consecutive spaces
Diffstat (limited to 'rc')
-rwxr-xr-x | rc/bin/play | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rc/bin/play b/rc/bin/play index 8953a1024..dfb05ed7f 100755 --- a/rc/bin/play +++ b/rc/bin/play @@ -1,6 +1,8 @@ #!/bin/rc rfork e +nl=' +' out=/dev/audio typ=() tmp=() @@ -31,7 +33,7 @@ fn play1 { if not { switch($2){ case *plain* - sed 's/
//g' | while(j=`{read}){ + sed 's/
//g' | while(j=`$nl{read}){ echo $"j >[1=2] if(~ $"j http:* https:* HTTP:* HTTPS:*){ hget -r 'User-Agent: play' -r 'Icy-MetaData: 0' $"j | play1 $"j @@ -104,5 +106,5 @@ while(~ $1 -*){ >$out { if(~ $#* 0){play1 stdin; exit} - for(i){echo $i} | play1 args plain + for(i){echo $"i} | play1 args plain } |