Thanks for the additional approaches (in I fact I new about neither IFS
in fish nor the {list}\n feature), as well as the pointers to the
discussions. I searched the mailing list before I posted, but not the
github page.
Elias
On 03/26/2015 06:23 PM, Greg Reagle wrote:
> ~> /bin/ls -1a /cdrom | xargs -I '{}' -0 echo a '{}' b
You are right, thanks. I had actually half-remembered that feature, but
failed to see it in a quick glance at the xargs documentation.
Elias
---
A couple of relevant issues on github:
https://github.com/fish-shell/fish-shell/issues/1656
https://github.com/fish-shell/fish-shell/issues/159
The problem: can't capture command substitution output with newlines intact
$ set out (seq 5)
> $ echo "$out"
> 1 2 3 4 5
To do it properly, we need to
On Thu, Mar 26, 2015, at 01:07 PM, Elias Assmann wrote:
> On 03/26/2015 03:51 PM, Greg Reagle wrote:
> > How does this work?
> >svnlist | xargs -0 svn ps svn:ignore
>
> That is a neat idea, but in this case it does not work like that because
> ‘svn propset’ wants the property value first. Fr
On 03/26/2015 03:51 PM, Greg Reagle wrote:
> How does this work?
>svnlist | xargs -0 svn ps svn:ignore
That is a neat idea, but in this case it does not work like that because
‘svn propset’ wants the property value first. From the help:
> svn h ps
propset (pset, ps): Set the value of a pro
This looks promising:
~> /bin/ls -1a /cdrom
.
..
~> /bin/ls -1a /cdrom | xargs -0 echo a
a .
..
Note that echo is called only once (only one 'a') and the newlines are
still there. The trick is that xargs is expecting a null character to
separate the arguments, which is not there, so it's all tre
Hi Fishers,
In fish, command substitution returns a list when the command outputs
multiple lines, like this:
> function foo; echo $argv[1]; end
> foo (echo a; echo b; echo c)
a
But what do you do when you need the output as one word? (Where, in
Other Shells, you might do ‘foo "$(echo a; ech