I would love to see !$ working like in bash. I always find myself typing this in the qutebrowser command line...
You mean something like:
#
:set colors.completion.category.fg red
:set colors.contextmenu.menu.fg !$
The second command is equivalent to :set colors.contextmenu.menu.fg red.
:help :open
:!$ -t github.com
The second command is equivalent to ::open -t github.com (:open -t github.com).
#
I don't like the idea of this personally.
It would be annoying more than useful and I don't find it very useful anyway for qutebrowser commands.
For example, this command would be annoying:
:open how does !$ work in bash?
..to allow making these searches, qutebrowser would need to provide a way to "escape" !$.
A single character version of !$ (e.g. ^) would probably be simpler to implement, but, still, I find it not very useful and a bit annoying and out of place in the context of qutebrowser command syntax.
Can you show me an example of a situation where you find yourself wanting to use this?
I bash one would not start a command by typing a colon (:). Qutebrowser is modeled after vi(m), not bash.
Try this in vim:
:syntax koehler
E410: Invalid :syntax subcommand: koehler
Oh! I meant the color scheme for hightlighting, not the syntax language!
:colorscheme !$
E185: Cannot find color scheme '!$'
So I would say vim doesn't do it, qutebrowser shouldn't do it.
Mainly because it of corner cases like pointed out by @emanuele6 in which I suspect most people would be surprised bash-like behaviour.
Also I honestly do not see that many use cases in either vim nor qutebrowser for this behaviour.
Finally, let's consider a world where I am convinced this makes sense: I'd then expect !! to work as well. And !-42. And !?foo?. And most importantly ^foo^bar^. Heck, why not !-2:s/foo/bar/p as well? :wink:
And once you have all the history completion going I will be surprised that Ctrl-R does not work 'as expected' (now), etc.
I know how I expect a vim-like browser to behave. If I wanted a bash-like browser, I'd be looking elsewhere. :wink:
I agree this probably isn't needed - I'm closing this for now, but if you have some more rationale on why this would be useful, @benedikt-bartscher, I might reconsider.
Most helpful comment
I bash one would not start a command by typing a colon (
:). Qutebrowser is modeled after vi(m), not bash.Try this in
vim:Oh! I meant the color scheme for hightlighting, not the syntax language!
So I would say vim doesn't do it, qutebrowser shouldn't do it.
Mainly because it of corner cases like pointed out by @emanuele6 in which I suspect most people would be surprised bash-like behaviour.
Also I honestly do not see that many use cases in either vim nor qutebrowser for this behaviour.
Finally, let's consider a world where I am convinced this makes sense: I'd then expect
!!to work as well. And!-42. And!?foo?. And most importantly^foo^bar^. Heck, why not!-2:s/foo/bar/pas well? :wink:And once you have all the history completion going I will be surprised that
Ctrl-Rdoes not work 'as expected' (now), etc.I know how I expect a vim-like browser to behave. If I wanted a bash-like browser, I'd be looking elsewhere. :wink: