This looked at __fish_print_commands, which goes via our man pages to
find the commands (it shouldn't, buuut), and exludes a hard-coded list
of pages.
So we do two thigns:
1. We add the other doc pages to the list
2. We check commands *later* - if we listed something explicitly it
should be used
* fish_key_reader: Simplify default output
It now only prints the bind statement. Timing information and such is
relegated to a separate "verbose" mode.
* Adjust fish_key_reader docs
* Adjust tests
What this did was
1. Find directory
2. Turn name into wcstring and return it
3. Turn name back into string for some operations
Instead, let's unglue the wcstringing from this, return the narrow
string and then widen it when we need.
This didn't even mention that it was a script file, it was just
filename: File not found
Which would be rather confusing if e.g. someone forgot that
`--profile` requires an argument.
This finds the first broken component, to help people figure out where
they misspelt something.
E.g.
```
echo foo >/usr/lob/systemd/system/machines.target.wants/var-lib-machines.mount
```
will now show:
```
warning: Path '/usr/lob' does not exist
```
which would help with seeing that it should be "/usr/lib".
This separates the list of builtin sources from the list of other
sources, since it seems like a natural cleavage point. The library
structure is unchanged, it's all just one big fishlib.a.
This was "--authoritative" (and unauthoritative). It was meant to make
fish mark everything that couldn't be generated via the completions as
an error, it was removed years ago and has been a no-op since then.
Commit fe63c8ad3 (Shadow/override iswdigit instead of changing it at
individual call sites, 2021-10-04) added our own implementation of
iswdigit() to common.h. The "include-what-you-use" rule means that
files that use iswdigit() should now include common.h. Do that.
Unlike in other shells, for-loops do not set $status if
1. the loop count is zero, or if
2. the loop body consists of only commands like "set" that don't
set $status.
POSIX for-loops always set an exit status (they set 0 if no loop
iterations). Following that would be awkward because it would add a
lot of complexity in combination with the 2 special cases above.
Document that "for" behaves the same as "set": it will pass through
existing $status, and also the last child's $status.
See the discussion in #8409
A variable may be broken across multiple lines with a backslash, for
example:
> echo $FISH_\
VERSION
Teach syntax highlighting about this line breaking. Fixes#8444
This behavior matches the way completions are found for `cargo run`,
`cargo test`, etc., and is more robust and correct compared to looking
at filenames.
check_global_scope_exists is meant to warn if the user creates a
universal variable shadowing a global. In practice it always returned
success (though it may print an error). Remove its return value and
clean up the call sites. Also rename it to
`warn_if_uvar_shadows_global`. No functional change in this commit.
On a commandline like "ls arg" (cursor at end) we do not expand
abbrevations on enter. OTOH, on "ls " we do expand. This can be
frustrating because it means that the two obvious ways to suppress
abbrevation expansion (C-Space or post-expansion C-Z) cannot be used to
suppress expansion of a command without arguments. (One workaround is
"ls #".)
Only expand-on-execute if the cursor is at the command name (no space
in between).
This is a strict improvement for realistic scenarios, because if there
is a space, the user has already expressed the intent to not expand
the abbreviation. (I hope no one is using recursive abbreviations.)
Closes#8423
This allows to disable autosuggestions in config or with
fish -C 'set -g fish_autosuggestion_enabled 0'
instead of only in existing interactive sessions.
I'm not sure if passing the env var table is actually necessary here,
since we already have a reader.
Adding the underline in the list of sections makes them bleed
together, making it hard to discern where one ends and the other
begins.
In the body of the text we don't have that issue - multiple links are
rarely next to each other.
Fixes#8439
Unfortunately, currently :program: doesn't link to the program's page.
So we use the old-school :ref: again where we should link, i.e. for
everything that's not the program the current page is about.
Fixes#8438
- More Notable
- Put ``_`` change into deprecation
- Things that can happen in scripts are scripting improvements, not
- interactive (funced is an interactive thing)
- Fix the variable name to turn off autosuggestions - it's $fish_autosuggestion_enabled.
This was supposed to act like `type -q` or `command -q`, in that it
returns 0 if at least 1 exists.
But because it used the wrong variable it didn't.
Fixes#8431.
This allows rebinding escape in the user list without breaking e.g.
arrow keys (which send escape and then `[A` and similar, so escape is
a prefix of them).
Fixes#8428.
+ No functional change here, just renames and #include changes.
+ CMake can't have slashes in the target names. I'm suspciious of
that weird machinery for test, but I made it work.
+ A couple of builtins did not include their own headers, that
is no longer the case.
Very slight performance increase (1% when parsing *all .fish scripts
in fish-shell*), but this removes a useless variable and some
.c_str()inging.
Theoretically it should also remove some wcslen() calls, but those
seem to be optimized out?