Older versions of fish don't seem to behave this way.  2.0.0 for
example and 2.1.2 as you tested.  This seems like a bug in 2.2.0 to
me.
It is certainly not good if commands are run with empty arguments when
expansion doesn't find anything.  If this is new / expected behavior
under 2.2.0 I would ask if there is a way to turn it off and go back
to normal behavior like other shells or older versions of fish.

Running "cat *.txt" is expected by the user to dump any *.txt file to
stdout and if one doesn't exist, give an error message.  Instead you
are sitting there with cat running with no arguments.

My basic question (that I didn't make clear) is whether this is
expected behavior as it seems like a bug to me.
Thanks.

-Andrew

On Mon, Sep 14, 2015 at 11:44 PM, Elias Assmann <elias.assm...@gmail.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 09/14/2015 11:26 PM, Andrew Gillham wrote:
>> 2.2.0 on mac (via homebrew) and 2.2.0-260-g7fe8a63 on debian:
>>> touch 1 2 3 ls 4*
>> No matches for wildcard '4*'. fish: ls 4* ^ 1 2 3
>>> ls 4* | wc -l
>> No matches for wildcard '4*'. fish: ls 4* | wc -l ^ 3
>
> If the question is, why do you see “1 2 3” in the first case and 3
> lines in the second, the answer is in the behavior of ‘ls’: ‘ls 4*’ is
> like ‘ls’ and lists the files 1, 2, and 3.  If output is to a
> terminal, ‘ls’ formats it in columns, but in your second example,
> output is to a pipe and ‘ls’ defaults to single-column output (like
> ‘ls -1’).
>
> That said, I see no output:
>
>> ls 4*
> fish: No matches for wildcard '4*'.
> ls 4*
>    ^
>> ls 4* | wc -l
> fish: No matches for wildcard '4*'.
> ls 4* | wc -l
>    ^
>>
>
> I am not sure if the difference is caused by some setting or by the
> different version of the shell (2.1.2 from Debian here).
>
> HTH,
>
>         Elias
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> Comment: Using GnuPG with Icedove - http://www.enigmail.net/
>
> iQIcBAEBAgAGBQJV975KAAoJEE/4gtQZfOqP65MQAIACJfa2ohHmpjb9t0l64NI1
> 7Db8czrex31ystpMDYNfDawTa6Z59aQ/n2bq1qRXSbaOM4clyUFH9hdT/z//KqvA
> FXW9iYjwwspmrvGEAGhc0I4qf81B9QQ17WlXa9L4jHf6PaBIVxxH+UPmCUceQ0bt
> AHLHPLaj551sHDFrzURTFV8tcu5ff5rLCTMGIlDFiW3hmStVAFxOQdwi1gzu3QPX
> wvCLuePkn7uWOSbd+IuKMN37cMtLijvoJenPv0hzB6GAUzUKimdoQIHEgF2rMK8A
> 5b05QjwClWhdNHN+CwofW6Mqbc0tv4kh+96MyzYaAcPc+rwTFLT1V/ntKVpcUxuS
> S4feJD4kdioYCBQHEuc2bR+bG8hCMaEHe2aMPRsBEjzX4/2azoCkiVRwpgHYnQi5
> 4CvJNgg5Xvs8avcpxmSKez+8mjg4oV/bXfuhuxzrKKqNLUyNWUMz5jIymYmmxLh+
> ApJDzDT2Xe/XeNdqv5khNj+5HUfEeFsm6sGQ2cYXWmgZBWuUhq711A8i4Nj0ZAVy
> M6Yp4QH2Ld340Lc6SZIqfnQCrn//Wp8tqZeHo7mvF7yimwtM+4VAM0/+eJFXAkf4
> yKV4G3dwd9tX0kRuEYUpV16GKwuYBu3+3rYDNGQkPSr7L2O95VEQFyVpVFN5fO8l
> RuJ19fX7wvBTcluORagY
> =Ey2m
> -----END PGP SIGNATURE-----
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Fish-users mailing list
> Fish-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fish-users

------------------------------------------------------------------------------
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to