Commit graph

14933 commits

Author SHA1 Message Date
Ian Chamberlain
3773baf1f3 Use cargo run --example to get list of examples
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.
2021-11-16 07:15:08 +01:00
ridiculousfish
15a3caf244 Refactor env_universal_callbacks
Reduce some allocations and simplify how events are emitted.
2021-11-14 17:39:52 -08:00
ridiculousfish
88a89d0a52 docs: remove an errant space 2021-11-14 13:40:02 -08:00
ridiculousfish
485a945004 Clean up check_global_scope_exists
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.
2021-11-14 13:07:02 -08:00
Johannes Altmanninger
64dddfc6ce Only expand abbreviations if cursor is directly at command token
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
2021-11-14 11:52:10 +01:00
Johannes Altmanninger
a32fa8fac9 Read $fish_autosuggestion_enabled on interactive startup
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.
2021-11-14 11:52:10 +01:00
Fabian Homborg
0f1bc5335a docs: :envvar: the rest of the variables
Just a quick mechanical translation
2021-11-12 19:43:00 +01:00
Fabian Homborg
6b7fe49858 docs: Restrict underlining links to the body
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
2021-11-12 18:47:56 +01:00
Fabian Homborg
57eccb7e1e docs: Readd note about the command to realpath 2021-11-12 18:28:35 +01:00
Fabian Homborg
9a9cd5172d docs: Don't make envvar names so large and in a different font
They're still bold, so still quite noticeable.

But not *IN YOUR FACE*.
2021-11-12 18:21:38 +01:00
Fabian Homborg
02553d8fa6 Docs: Don't use seealso
This is too eye catching and almost unreadable in the dark theme.
2021-11-12 18:13:36 +01:00
Fabian Homborg
edc09c8419 Docs: Switch back to vanilla :ref: for commands that should be linked
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
2021-11-12 18:02:56 +01:00
Fabian Homborg
2e9e94f17e Fix broken envvar link
Apparently you can't use spaces here.
2021-11-12 17:57:11 +01:00
Fabian Homborg
94555ad26b CHANGELOG: Reorder
- 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.
2021-11-12 17:19:38 +01:00
Aaron Gyes
7a8fce6941 Thwart more dastardly schemes
thanks @faho
2021-11-12 04:52:38 -08:00
Aaron Gyes
e6eb049aeb Remove imperialist sabotage to previous commit
Juche!
2021-11-12 04:39:11 -08:00
Aaron Gyes
ac1df310c8 Long march towards more structured text 2021-11-12 04:22:35 -08:00
Fabian Homborg
c16e30931b Fix abbr return status
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.
2021-11-11 16:46:23 +01:00
Fabian Homborg
aa470e12b2 Defer escape bindings as well
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.
2021-11-10 20:40:21 +01:00
Aaron Gyes
197f93e784 ulimit.cpp: doesn't need to #include io.h 2021-11-09 17:51:58 -08:00
Aaron Gyes
eb990c07c8 Let's make src/ easier to grok, move builins to src/builtins
+ 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.
2021-11-09 17:39:10 -08:00
Fabian Homborg
4cad079aeb Le Changuelogue 2021-11-08 22:56:42 +01:00
Fabian Homborg
66566c1650 ast: Stop dropping down to wchar_t needlessly
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?
2021-11-08 21:24:00 +01:00
ridiculousfish
389b75fe42 Restyle codebase with clang-format 2021-11-08 12:21:11 -08:00
Daniel Eklöf
20a1bf289f Recognize all foot terminfo variants when sending OSC-7 (PWD) 2021-11-08 21:14:12 +01:00
Daniel Eklöf
bfedb3608f fish_vi_cursor: add support for alternative foot terminfos
Foot has several terminfos:

* foot - the default one
* foot-direct - 24-bit color terminfo, similar to xterm-direct (used by e.g. emacs)
* foot-extra - alternative to the ncurses provided terminfo, with a couple of extra, non-standard
capabilities
* foot-extra-direct - 24-bit color version of the above

There may also be other distro-custom terminfo names (serving the same purpose as foot-extra*)
2021-11-08 21:14:12 +01:00
Fabian Homborg
c5530421f7 themes: Add fish_color_keyword
Same as $fish_color_command for now.

This makes switching from a theme with one to a theme without nicer.
2021-11-08 19:06:01 +01:00
Fabian Homborg
b96c92a7f7 fish_config: Erase global theme variables if saving 2021-11-08 17:47:49 +01:00
Fabian Homborg
8596d7e344 Themes: Add $fish_color_option
Set it to $fish_color_param for now.
2021-11-08 17:41:34 +01:00
Fabian Homborg
f724541c0a Fix setting colors via webconfig
Fixes #8419.
2021-11-08 17:38:05 +01:00
Fabian Homborg
12117cfe3d fish_vi_cursor: Support foot
Fixes #8391
2021-11-08 17:23:35 +01:00
Fabian Homborg
e163990788 CHANGELOG new completions 2021-11-08 17:22:02 +01:00
Emily Seville
ee546a9f03 Create pabcnet_clear.fish 2021-11-08 17:20:27 +01:00
Emily Seville
f75cfb1796 elvish completions 2021-11-08 17:19:55 +01:00
Emily Seville
2c4bbe51cf --version option value add: 2021-11-08 17:19:30 +01:00
Emily Seville
fb9bc2b396 Runtime option support for mono command 2021-11-08 17:19:30 +01:00
Emily Seville
795716613b Basic mono command complitions:
- help/version options
- development options
2021-11-08 17:19:30 +01:00
Emily Seville
868a50bd99 Descriptions simplified for wineboot completions 2021-11-08 16:02:52 +01:00
Emily Seville
f19079aff6 Update winemaker.fish 2021-11-08 16:02:52 +01:00
Emily Seville
e38eebcb11 wine -> wineboot replace in wineboot.fish 2021-11-08 16:02:52 +01:00
Emily Seville
13afc8ae3a winemaker completions 2021-11-08 16:02:52 +01:00
Emily Seville
8029b64c69 wineboot completions 2021-11-08 16:02:52 +01:00
Emily Seville
491551b406 "wine" command completions 2021-11-08 16:02:52 +01:00
ridiculousfish
25f47729e7 math: Correct printing of negative and large values in octal and hex
This fixes printing octal and hex values that are negative or larger
than UINT_MAX.

Negative values get a leading -, like:

    > math --base hex -10
    -0xa

Fixes #8417.
2021-11-07 16:43:30 -08:00
Aaron Gyes
1261b53d96
Revert 2021-11-07 01:06:57 -07:00
exploide
dc3cf14bac completions ip: added more link types 2021-11-07 07:09:54 +01:00
Aaron Gyes
3de63f7e21 fallback.h: this header guard was broken
... not that we had things in here that I think it would
have really affected, I hope.
2021-11-06 23:09:20 -07:00
Aaron Gyes
61ccf87cee Revert! These were for my repo. Oh no.
Revert "Move the file - it was trying to triggr stuff."

This reverts commit 108560ff55.

Revert "fixup"

This reverts commit fdc0f2f6a7.

Revert "configure more analyzers, skip vendored stuff."

This reverts commit 023f6683f0.

Revert "Update codeql-analysis.yml"

This reverts commit ea25db544e.
2021-11-06 23:06:01 -07:00
Aaron Gyes
108560ff55 Move the file - it was trying to triggr stuff. 2021-11-06 22:52:29 -07:00
Aaron Gyes
fdc0f2f6a7 fixup 2021-11-06 22:18:19 -07:00