It's obvious there's no convincing you that what you are asking for is not only 
insanely dangerous, but also in violation of the expected behavior of pretty 
much every CLI shell ever created.

Also, fish absolutely does use history for suggestions.

Also, if you think pressing ^F before you press <return> is "very slooooow" 
then I think you have a highly distorted sense of how long you spend typing 
each command and how fast you can press a simple chord.

Oh, and your attempted elitism (bragging about having used old-school CLI 
commands and accusing me of not being a heavy terminal user) is not only 
offensive, but also not in the slightest bit constructive.

Face it; if what you were suggesting really makes as much sense as you think it 
does, then shells would be offering it as a default behavior. Or do you think 
shell authors are not heavy terminal users as well?

Regardless, this will be my last email on this thread. And I suspect that if 
you continue to argue, you won't find anyone else who agrees with you that this 
should be a default behavior for fish. Feel free to fork the shell if you want.

-Kevin

On Apr 9, 2014, at 12:35 PM, glphvgacs <darwinsker...@gmail.com> wrote:

> On Wed, Apr 09, 2014 at 11:17:48AM -0700, Kevin Ballard wrote:
>> On Apr 9, 2014, at 9:22 AM, glphvgacs <darwinsker...@gmail.com> wrote:
>> 
>>> On Wed, Apr 09, 2014 at 10:31:26AM +1000, Ian Munsie wrote:
>>>> On 9 April 2014 08:14, Kevin Ballard <ke...@sb.org> wrote:
>>>>>>> dangerous and surprising behavior to put into a terminal shell. For
>>>>>>> example, `rm f` should _never_ automatically invoke `rm f*`.
>>>>>>> 
>>>>>>> -Kevin
>>>> 
>>>> Kevin's example was that he has previously deleted all files starting
>>>> with an f (which I've done on many occasions) and is now attempting to
>>>> remove a single file called f (which I've done on many occasions), but
>>>> your suggestion would cause fish to delete all files starting with an
>>>> f again - I think that perfectly illustrates why automatically
>>>> accepting suggestions in the shell is a really *really* bad idea.
>>> 
>>> well, haven't we all made ruinous typo's? i think yes. so they happen
>>> and if you don't read what you type you're bound to do harm. but if you
>>> do read carefully then it is _only_ the _first_ run that calls for full
>>> attention. repeating the same command _less_ so. now your example is 
>>> good case for emphasising the 'less' is that sentence.
>> 
>> Just because a command is safe to run once does not in the slightest
>> mean it is safe to run again in the future. This comes back to my
>> trivial example `rm f*` vs `rm f`. The fact that I wanted to delete
>> all files beginning with the letter "f" in the past says nothing
>> whatsoever about how safe it is to delete all files beginning with the
>> letter "f" today. Maybe last time I was deleting "foo.txt", but today
>> it would delete "From Zero to Hero: A Biography That Took 12 Years To
>> Write And I Have No Backups.tex".
> 
> true, but you're thinking about this without the '_less_' (see above).
> your argument is true for a user who is drunk with the power and speed
> of this new feature in fish _or_ he is just drunk anyway so he pays 0
> attention to what's being suggested.
> also you're eliminating all cases that are just pure repettitions. what
> if 'rm /tmp/foo' happens often enough that i want it to be pretty much
> at my fingure tips. in fact what you learn after a while is don't search
> for 'rm' because that's dangerous, look for 'tmp' or 'oo' and you know
> you're gonna hit what you want.
> 
>>> and fish wouldn't be the first shell to enable this. zsh has it, just try
>>> this:
>>> 
>>> zle-line-init() {
>>> zle history-incremental-search-backward
>>> }
>>> zle -N zle-line-init
>>> 
>>> i haven't had that now for over 3 years in my .zshrc. no catastrophes so
>>> far.
>> 
>> Experimentally, that appears to simply trigger a backwards-i-search on
>> every new line. That's an explicit history search that can be
>> cancelled with the escape key. It behaves radically different than
>> fish's suggestions.
> 
> that is my point. fish doesn't include history in suggestions or if it
> does it's not hight up in the list. a hook to have history to be the
> first suggestion is what i'm asking. in fact you think of history-being
> the-1st-offered-suggestions as the same proxy as having an extra key
> stroke before executing the cmd.
> 
>> Not only does it not let you enter brand new
>> commands (as it's explicitly a search of history), 
> 
> yes it does. after escape you're in vicmd. just hit 'i' and you're in
> viins. now type you're brand new cmd. if you're emac user well i don't
> know much about emac but i'm pretty sure you can set it up.
> 
> btw, this will cycle through hits:
> bindkey -M isearch '\t' vi-repeat-search
> 
>> but it's also modal. Meanwhile fish's suggestions are just that:
>> suggestion. It's not an explicit search, it's not anything that can be
>> cancelled, and it doesn't prevent you from typing brand new commands
>> that have not been executed before.
>> 
>> I also question how you can stomach having that as your zle-line-init.
>> Don't you get tired of canceling the search so you can enter new
>> commands? 
> 
> not after the first say 50 commands. try it and you will see.
> 
>> Or is your Terminal usage actually restricted to just
>> running the same commands over and over again?
> 
> hmm, lets see, i boot into kmscon with 8tty's and i run pretty much
> _everything_ from commandline.
> zsh,mutt,newsbeuter,vim,less,ledger,calcurse,cboard,sc,git,man,elinks
> and so on
> 
> now you need to understand that commandline is not just shell or
> terminal applications. so add to the list:
> dmenu,dwm,dwb,zathura and so on.
> 
> now lets hear your commandline usage. judging by your emails (not
> wrapped properly for small terminals and the way you top-post on a
> mailinglist) i would argue notmuch. don't ask how they're related. it's
> too much to explain but that's the way it is.
> 
>> In any case, your usage of the terminal here is extremely
>> non-standard. I've never in my life heard of anyone else who wants to
>> prioritize history search over the ability to execute new commands.
> 
> yes, because they usually come to commandline rarely. once you make your
> main interface commandline, even in GUI, then you see the merits in what
> i'm suggestting here.
> 
>> The vast majority of people have to press a keybinding to even
>> initiate history search. And the people who are using shells like Fish
>> that can auto-suggest still press a keybinding to accept the
>> suggestion.
>> 
>> -Kevin
> 
> that's very slooooow, sorry.


------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to