On Apr 8, 2014, at 3:12 PM, glphvgacs <darwinsker...@gmail.com> wrote:
> On Tue, Apr 08, 2014 at 02:53:16PM -0700, Kevin Ballard wrote: >> I am having a hard time figuring out what you're trying to say here. >> The only thing I got with any certainty is that you think that hitting >> <enter> should auto-accept the suggestion. That's an incredibly >> dangerous and surprising behavior to put into a terminal shell. For >> example, `rm f` should _never_ automatically invoke `rm f*`. >> >> -Kevin > > hello, > i don't think you have that one either. > > rm -rf /<Enter> > > will execute 'rm /' in any shell anyway. Well yes, because that's what I asked it to do. > question then is why would suggestion engine bring that up. > > in any case, there are two things that i'm asking about: > 1. prioriotising the auto-completion/auto-suggestion's > this is exactly what vimperator or pentadactyl do in firefox. > so user could set auto-suggestions-order e.g. in this order: > > set auto-suggestion-order=history,cmd,path > > then history would be offered first and cmd next, with a delim in > between perhaps, and so on. > so in that case if user has already run 'rm -rf / ' he doesn't get a > second chance :) > kidding aside, since history are the commands that have already been > checked and run there is a level of safetly in repeating them where as > in other shells you always have to check for type everytime. > > 2. accepting the first *hit* with an <Enter> > this exactly what Safari's or chrome's address bar do. > hit being the first match for the input so far and vimperator did not > offer this last time i checked. Web browser behavior is _completely unrelated_ to shell behavior. Whether or not it's appropriate for a web browser to auto-accept its first suggestion when you type a URL has no bearing whatsoever on whether it's appropriate for a shell to accept its first suggestion when you hit enter. Among other reasons, the likelihood that the browser's suggestion is correct is vastly higher than the likelihood that the shell's suggestion is correct, and the negative effects of auto-accepting the first history suggestion in a browser is effectively zero whereas the negative effects of auto-accepting the first suggestion in a shell are potentially catastrophic. If you want to accept the suggestion, just hit ctrl-f. That accepts the entire line as-is, and you even have a chance to edit it further before pressing enter. -Kevin ------------------------------------------------------------------------------ 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