Diggory Hardy | 4 Jun 10:41 2010
Picon

Re: Globbage?

(Appologies if this doesn't get associated with the right thread, since it's not a "reply". I just wanted to
add 2 cents..)

I also wanted to say I agree with David's view... it's annoying having to quote globbing rules in scp etc.
There was a time when I didn't really value this.. but recently I've been been bumping into this a lot more
often with things like:
scp server:path/file*
find . -name somefile*.ext

At which point -- I'm sure you get the idea. So, the options I see:

1.  keep as is
2.  configuration option -- but as Michael points out: "Configurability is the root of all evil" (well...
not ideal at least)
3.  'noglob' command... not a lot better
4.  Only expand globbing patterns when valid (as in bash)

Does anyone have anything to say against option 4? Sure, error messages from commands like 'ls file*' are
going to change from:

fish: Warning: No match for wildcard “file*”. The command will not be executed.
ls file*
   ^

to:

ls: cannot access file*: No such file or directory

but I don't see why this should be a big deal. Or are there some important cases I've missed, where this is a
bigger deal?
(Continue reading)

Beni Cherniavsky-Paskin | 4 Jun 16:31 2010
Picon

Re: Globbage?

On Fri, Jun 4, 2010 at 11:41, Diggory Hardy <diggory.hardy <at> gmail.com> wrote:
> I also wanted to say I agree with David's view... it's annoying having to quote globbing rules in scp etc.
There was a time when I didn't really value this.. but recently I've been been bumping into this a lot more
often with things like:
>
> scp server:path/file*
> find . -name somefile*.ext
>
The first example is quite safe, but the second has a real chance of a
matching file in the current dir, which would be expanded by fish and
not do what you wanted at all.

> At which point -- I'm sure you get the idea. So, the options I see:
>
> 1.  keep as is
> 2.  configuration option -- but as Michael points out: "Configurability is the root of all evil"
(well... not ideal at least)
> 3.  'noglob' command... not a lot better

Bah.  -1 on config/noglob.
I believe the language must be unambiguous, and the problem should be
attacked by other means.

> 4.  Only expand globbing patterns when valid (as in bash)
>
> Does anyone have anything to say against option 4? Sure, error messages from commands like 'ls file*' are
going to change from:
>[...]
> but I don't see why this should be a big deal. Or are there some important cases I've missed, where this is a
bigger deal?
(Continue reading)

Philip Ganchev | 4 Jun 20:23 2010
Picon

Re: Globbage?

I love the idea of interactive globbing!

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
Martin Bähr | 5 Jun 07:06 2010
Picon

Re: Globbage?

On Fri, Jun 04, 2010 at 05:31:43PM +0300, Beni Cherniavsky-Paskin wrote:
> (B) there should be an easy one-press way to quote the current wildcard.
>    Maybe pressing TAB on an unmatched wildcard should quote it?

a slight problem with this is that if the user expects a match, but the
match fails because of a typo, then it will be quoted, but since the
user didn't want quotes he or she has to go back to remove the quote and
correct the typo.

although, the idea could work if the tab toggles quoting. 
so hitting tab on a quoted argument removes the quotes again.

greetings, martin.
--

-- 
cooperative communication with sTeam      -     caudium, pike, roxen and unix
searching contract jobs:  programming, training and administration - anywhere
--
pike programmer      working in china                   community.gotpike.org
foresight developer  (open-steam|caudium).org              foresightlinux.org
unix sysadmin        iaeste.at                                     realss.com
Martin Bähr          http://www.iaeste.or.at/~mbaehr/            is.schon.org

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
Philip Ganchev | 5 Jun 07:31 2010
Picon

Re: Globbage?

On Sat, Jun 5, 2010 at 1:06 AM, Martin Bähr
<mbaehr@...> wrote:
> On Fri, Jun 04, 2010 at 05:31:43PM +0300, Beni Cherniavsky-Paskin wrote:
>> (B) there should be an easy one-press way to quote the current wildcard.
>>    Maybe pressing TAB on an unmatched wildcard should quote it?
>
> a slight problem with this is that if the user expects a match, but the
> match fails because of a typo, then it will be quoted, but since the
> user didn't want quotes he or she has to go back to remove the quote and
> correct the typo.

Fish needs an undo command in general.

> although, the idea could work if the tab toggles quoting.
> so hitting tab on a quoted argument removes the quotes again.

Toggles are confusing, in my opinion.

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
Beni Cherniavsky-Paskin | 5 Jun 19:51 2010
Picon

Re: Globbage?

On Sat, Jun 5, 2010 at 08:06, Martin Bähr
<mbaehr <at> email.archlab.tuwien.ac.at> wrote:
> On Fri, Jun 04, 2010 at 05:31:43PM +0300, Beni Cherniavsky-Paskin wrote:
>> (A) fish should highlight unmatching wildcards in red as you type.
>>     If the command is going to fail, there is no reason to make you
>>     press Enter to discover this.
>>
>> (B) there should be an easy one-press way to quote the current wildcard.
>>    Maybe pressing TAB on an unmatched wildcard should quote it?
>
> a slight problem with this is that if the user expects a match, but the
> match fails because of a typo, then it will be quoted, but since the
> user didn't want quotes he or she has to go back to remove the quote and
> correct the typo.
>
Right, that's the part where syntax highlight (A) helps - the user
should see it in red before he presses TAB.

--

-- 
Beni Cherniavsky-Paskin <cben <at> users.sf.net>

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Fish-users mailing list
Fish-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users
(Continue reading)

David Frascone | 9 Jun 17:42 2010

Re: Globbage?



On Sat, Jun 5, 2010 at 1:51 PM, Beni Cherniavsky-Paskin <cben-iA+eEnwkJgzk1uMJSBkQmQ@public.gmane.org> wrote:
> a slight problem with this is that if the user expects a match, but the
> match fails because of a typo, then it will be quoted, but since the
> user didn't want quotes he or she has to go back to remove the quote and
> correct the typo.
>
Right, that's the part where syntax highlight (A) helps - the user
should see it in red before he presses TAB.


I've found that I type WAY faster than my eyes process syntax highlighting.  By the time I notice it's red, return has already been pressed.

-Dave
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
Jan Brands | 4 Jun 22:54 2010
Picon

Re: Globbage?

> [Another idea that springs to mind from the similarity of fish to LISP
> is to add a one-sided quoting syntax affecting one word.  Something
> like::
>      find -name `*.foo
> which would be equivallent to:
>      find -name "*.foo"
> But no, I'm not seriously proposing this.]

But you can already do:
	find -name \*.foo
(which I actually do quite often with "find")

> P.S. Are you aware of fish's **/somefile*.ext recursive globbing syntax?
> Doesn't change the discussion, just making sure you didn't miss it.
>
No. Thanks :-)

	Jan

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
Diggory Hardy (STI | 22 Jun 10:32 2010
Picon
Picon

bug: searching history with UP then back-tracking with DOWN doesn't always return to previous item

Hello,

When searching history with the UP key (I think without search-text), sometimes I go past the line I want,
hence press DOWN to back-track. Sometimes when I do this, completely different history lines are shown
when pressing DOWN to those I just saw.

Can anyone help track this down? Is it to do with multiple shells merging history?

I'm using the debian-testing package:
> fish --version
fish, version 1.23.1

Sorry for not properly checking the mailing list, but it doesn't appear to be searchable :(

Cheers,
Diggory

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
Isaac Dupree | 23 Jun 04:04 2010

Re: bug: searching history with UP then back-tracking with DOWN doesn't always return to previous item

On 06/22/10 04:32, Diggory Hardy (STI) wrote:
> Hello,
>
> When searching history with the UP key (I think without search-text), sometimes I go past the line I want,
hence press DOWN to back-track. Sometimes when I do this, completely different history lines are shown
when pressing DOWN to those I just saw.
>
> Can anyone help track this down? Is it to do with multiple shells merging history?

It's a fact of life!  No, I haven't tried to track it down and I haven't 
thought of where to start yet (maybe start by looking for the 
history-code??) -- I've just used Fish for a while.  It'd be nice to fix :-)

-Isaac

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo

Gmane