Prior to this change, `fish_private_mode` worked by just suppressing
history outright. With this change, `fish_private_mode` can be toggled on
and off. Commands entered while `fish_private_mode` is set are stored but
in memory only; they are not written to disk.
Fixes#7590Fixes#7589
Prior to this change, a glob like `**/file.txt` would only match
`file.txt` in subdirectories; the `**` must match at least one directory.
This is historical behavior.
With this change we move a little closer to bash's implementation by
allowing a literal `**` segment to match in the current directory. That
is, `**/foo` will match both `foo` and `bar/foo`, while `b**/foo` will
only match `bar/foo`.
Fixes#7222.
This is super cheesy.
One of the most common feature requests we get is "control-r must
search", even tho just using history-search-backward via e.g. up-arrow
is perfectly capable. The only real difference is that ctrl-r search
in other shells allows editing the search term by default, while we
stop the history search and edit the new commandline in those cases.
So, since the major problem is muscle-memory on ctrl-r,
let's just use that!
This makes ctrl-r do nothing on empty commandlines, and do
history-search-backward otherwise, so the basic flow of "press ctrl-r
to start history search, enter your search term, press ctrl-r to cycle
through matches" just works (except the first ctrl-r is useless and it
doesn't show anything).
See #602.
This makes history searches case-insensitive, unless the search string
contains an uppercase character.
This is what vim calls "smartcase".
Fixes#7273.
Some formatting improvements, an explanation of $PWD, and some updates
- --on-process-exit is gone, the fish_command_not_found event is gone,
nobody has sent enhancements via the mailing list in years.
[ci skip]
This harkens back to the days of fish's "we don't need no stinkin'
echo" minimalism. That's long past, we have a bunch useful builtins
now just because they are useful, not because they have to be builtins.
[ci skip]
The person reading this is "you". It's completely okay and sounds
better to address them directly.
When we're talking about OS users or users of fish script the reader
writes, "the user" is still okay.
[ci skip]
This needs to have the vi-bindings take precedence, so they need to be
executed *last*.
It just needs to tell them that they shouldn't erase all the bindings.
[ci skip]
Instead of informing the bell character (hex 07), the example was using
an escaped \ followed by x07.
$ echo \\x07
\x07
$ echo \x07
$ echo \x07 | od -a
0000000 bel nl
0000002
$
* docs: Use \u instead of \\u
Instead of informing the Unicode character 慡, this example was using an
escaped \ followed by u6161.
$ echo \\u6161
\u6161
$ echo \u6161
慡
Before:
$ string escape --style=var 'a1 b2'\\u6161 | string unescape --style=var
a1 b2\u6161
Now:
$ string escape --style=var 'a1 b2'\u6161 | string unescape --style=var
a1 b2慡
This can be used to determine whether the previous command produced a real status, or just carried over the status from the command before it. Backgrounded commands and variable assignments will not increment status_generation, all other commands will.
One of the nicest things about fish is how introspectable it is. We
should probably get people to just mess around and see what is
implemented how. This is a step in that direction.
[ci skip]
* docs/faq: Mention prepend_sudo
[ci skip]
* __fish_prepend_sudo: Use $history[1] if commandline is empty
Currently, if you press alt+s with an empty commandline, it inserts
"sudo", which seems fairly useless.
Now, it inserts "sudo " followed by the last history entry, which
makes it a replacement for `sudo !!`.
* docs