Commit Graph

16616 Commits

Author SHA1 Message Date
David Adam
af833a700d Release 3.6.0 2023-01-07 22:12:25 +08:00
David Adam
5db2d326f5 Bump copyright year 2023-01-06 18:26:21 +08:00
David Adam
aa8e5f9a8b Work on 3.6.0 2023-01-04 23:37:25 +08:00
ridiculousfish
700eeb7785 fish_git_prompt: only do macOS workarounds for /usr/bin/git
On macOS, fish_git_prompt was failing to correctly handle the case where
another git was installed, e.g. /usr/local/bin/git from Homebrew.
Disable the workarounds in that case.
2023-01-02 12:27:27 -08:00
David Adam
ad46dacdad CHANGELOG: work on 3.6.0 2023-01-02 22:38:36 +08:00
David Adam
c36ebd9653 CHANGELOG: work on 3.6.0 2023-01-01 22:44:16 +08:00
David Adam
c2ad9e44ec docs: include fish_cursor_selection_mode in list of special variables 2023-01-01 22:44:09 +08:00
Johannes Altmanninger
9bd6097fcb fish_git_prompt: silence xcrun error when XCode is not installed
Our macOS workarounds involve running "xcrun" to check if Git is installed.
On a freshly upgraded Ventura system that does not have XCode or
CommandLineTools installed, "xcrun" will print this error:

    xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

on every prompt. Let's silence this error.

(cherry picked from commit a0840637fa)
2023-01-01 14:38:48 +01:00
Fabian Boehm
c39c598996 docs/prompt_pwd: Fix envvar linking 2022-12-30 14:31:32 +01:00
Fabian Boehm
d14f39e583 docs/language: Some small bits 2022-12-30 13:52:55 +01:00
Fabian Boehm
3bacbeb2e1 docs/language: Improve argument parsing section
Better motivation and explanation.
2022-12-30 13:52:28 +01:00
Fabian Boehm
4e7ecdfb40 completions/systemd-cryptenroll: Remove executable bit
Should be harmless
2022-12-30 13:42:54 +01:00
Akatsuki Rui
57bcbfa863 completions/abbr: fix complete condition
- fix complete condition
- add short flag

the conditions are not include short flags currently.
and conditions are not right, causing the complete to not work as expected.
2022-12-29 20:42:32 +01:00
Johannes Altmanninger
53505c89dd completions/abbr: tweak completions for --function argument
Since the function argument now sticks to --function, we need to adjust
a condition.
2022-12-29 10:20:33 +01:00
Aaron Gyes
7340761b21 subsequence_in_string: fix broken optimization
haystack.size() > haystack.size() is always false

change it to needle.size() > haystack.size() as seems intended
2022-12-29 01:02:44 -08:00
Fabian Boehm
21c09c392b docs/language: Improve an example
If a code sample uses prompt-style (with `>` lines) it needs to do
that consistently, or the rest is taken as output and not highlighted.
2022-12-28 20:42:33 +01:00
Fabian Boehm
c844b974b3 fish_git_prompt: Silence disown
The `git` can already have finished here, leading to "disown: There
are no suitable jobs". This has caused a failure on Github Actions.

So we do $last_pid and silence all output, like we do in other spots
2022-12-28 14:21:24 +01:00
Fabian Boehm
ddcb14c8f8 docs: Make color variables envvar definitions
This allows linking them from elsewhere (currently fish_indent) and
also improves the formatting - the code formatting here isn't actually a good look.
2022-12-28 12:21:42 +01:00
ridiculousfish
8ee4efe7d8 Changelog fix for #9343 and #6625 2022-12-27 11:48:58 -08:00
ridiculousfish
6742d11a0e __fish_anypython: do not automatically run python3 on macOS
macOS ships with a stub `/usr/bin/python3` which by default opens a
dialog to install the command line tools. As we run `python3` initially
at launch, this causes the dialog to appear on first run of fish, if the
command line tools are not installed.

Fix this by detecting the case of `/usr/bin/python3` on Darwin without
the command line tools installed, and do not offer that as a viable
python.
2022-12-27 11:48:58 -08:00
ridiculousfish
a77bc70def fish_git_prompt: be careful about invoking git on macOS
git on macOS has two hazards:

1. It comes "preinstalled" as a stub which pops a dialog to install
   command line developer tools.

2. It may populate the xcrun cache when run for the first time, which
   may take several seconds.

We fix these as follows, both fixes limited to Darwin:

1. If git is `/usr/bin/git` and `xcode-select --print-path` fails,
   then do not run git automatically.

2. Second, if there is no file at `xcrun --show-cache-path`, we take it
   as an indication that the cache is not yet populated. In this case we
   run `git` in the background to populate the cache.

Credit to @floam for the idea.

Fixes #9343. Fixes #6625.
2022-12-27 11:48:58 -08:00
Fabian Boehm
2e01b0038d CONTRIBUTING: Some more
Actually mention which formatters we use so people can install them.
2022-12-27 17:56:52 +01:00
Fabian Boehm
72ec20d3af docs: Some more in the intro sections 2022-12-27 15:22:17 +01:00
Fabian Boehm
a63c21a663 docs: Some more on tutorial and combiners 2022-12-27 14:17:27 +01:00
ridiculousfish
b42c00b706 macOS notarization: migrate from altool to notarytool
altool is deprecated and notarytool is much nicer. Switch to using it.
This only affects the notarization process for macOS binaries.
2022-12-26 15:25:42 -08:00
Fabian Boehm
d1741c42f3 docs/interactive: Some slight rewordings and additions to bindings 2022-12-26 21:34:11 +01:00
Fabian Boehm
d6a117d2a4 docs/interactive: Move bindings under "Command line editor" 2022-12-26 21:19:48 +01:00
Emily Grace Seville
f15e5ce1da Add yash completion 2022-12-24 11:14:23 +01:00
Fabian Boehm
ee0ae9972b More CHANGELOG work
Now every issue should be either ignored or mentioned.
2022-12-24 11:12:51 +01:00
Fabian Boehm
b383de7f95 CHANGELOG work on 3.6.0 2022-12-24 10:48:35 +01:00
Fabian Boehm
4c39aeed87 abbr: Let --function use a mandatory argument
This now means `abbr --add` has two modes:

```fish
abbr --add name --function foo --regex regex
```

```fish
abbr --add name --regex regex replacement
```

This is because `--function` was seen to be confusing as a boolean flag.
2022-12-24 10:29:26 +01:00
Fabian Boehm
36e8117206 Update littlecheck to 3d8a08bd164a96f53aef2a00a818e8778808e95a
No longer escaping quotes by moving the output around.
2022-12-23 18:49:41 +01:00
Fabian Boehm
c192bf94b2 Translate a few things to german
(I find translation to be absolutely gruelling work where I'm never
really sure that I've done it right, so I don't do it a lot)
2022-12-23 14:15:30 +01:00
Fabian Boehm
ff800c68e8 tests: Increase one more timeout
Example output from a Cirrus bionic-asan-clang run:

```
fish: Unknown command: man
/tmp/cirrus-ci-build/share/functions/__fish_man_page.fish (line 30):
        if man "$maincmd" &>/dev/null
           ^~^
in function '__fish_man_page'
�

[I] prompt 9>echo TEXT
[I] prompt 9>echo TEXThrAi
[I] prompt 9>echo TEXThrAi
TEXThrAi
```

Yes, this detected escape, waiting *300ms* and then "h" as being below
the escape timeout of 120ms.
2022-12-23 12:18:20 +01:00
Fabian Boehm
00120676a5 Update translation template
Fixes #9425
2022-12-23 11:28:11 +01:00
Fabian Boehm
9da9f698df completions/mpv: Don't use "command"
(the alternative here is to explicitly check `command -q mpv`, but I'm
going for the idea that a thing called "mpv" is going to be an mpv)

Fixes #9426
2022-12-23 11:18:00 +01:00
Fabian Boehm
eed46a65ce Simplify CONTRIBUTING
This adds a section on completions *first* and removes all mentions of
oclint as it appears to be dead.

The Vim configuration section seems to be likely to be outdated and we
don't *really* use doxygen anymore.
2022-12-22 19:28:13 +01:00
Fabian Boehm
3932559409 Fix tests
I always forget that littlecheck escapes these
2022-12-22 17:34:10 +01:00
Fabian Boehm
3005adebd5 Revert "Remove print_hints from builtin_missing_argument and builtin_unknown_option"
Unfortunately print_hints was true *by default* - so for all builtins
that didn't pass it it would now be false instead.

This resulted in the trailer missing, which includes the line number
and context. So if you ran a script that includes `bind -M` the error
message would now just be "bind: -M: option requires an argument",
with no indication as to where.

This reverts commit 8a50d47a46.
2022-12-22 17:24:47 +01:00
Emily Grace Seville
6608ddc95b Use just options described in man page 2022-12-22 12:18:53 +01:00
Emily Grace Seville
e9d2bc9db1 Add oksh completion 2022-12-22 12:18:53 +01:00
Fabian Boehm
dfaafd733a docs: Simplify exporting section 2022-12-21 16:24:00 +01:00
Fabian Boehm
d2cd6c1cd6 docs: Remove the term "wrapper"
This committed the sin of introducing a concept by giving it two
names:

> An alias, or wrapper, around ``ls`` might look like this

The term "wrapper" doesn't pull its weight here. It's simpler to just
call them aliases throughout. We do use "a simple wrapping function"
in another place, but that's to define "alias", not as a separate name.
2022-12-21 16:24:00 +01:00
Fabian Boehm
7435a2614d docs: Link to abbr more 2022-12-21 16:24:00 +01:00
ridiculousfish
5f23da9939 Add a TSAN workaround and re-enable the test
This reverts commit 865602e8d1.
2022-12-19 15:54:23 -08:00
ridiculousfish
8a50d47a46 Remove print_hints from builtin_missing_argument and builtin_unknown_option
The print_hints variable was always false, so just remove it.

This caused a cascade of other changes where the parser_t variable
becomes unused, so remove it from the call sites.

No functional change expected here.
2022-12-19 15:05:51 -08:00
Fabian Boehm
285b0602e4 docs: Fix link 2022-12-19 20:22:27 +01:00
Fabian Boehm
865602e8d1 Github Actions: Disable tsan once more 2022-12-19 19:55:36 +01:00
Fabian Boehm
f82e00dbf6 docs: Some on completions 2022-12-19 19:46:16 +01:00
Fabian Boehm
8dd89ff9dd docs: Some work on commands
The difference between keywords and "decorations" isn't important here.
2022-12-19 19:39:47 +01:00