Commit Graph

16643 Commits

Author SHA1 Message Date
Fabian Boehm
51bce422fd docs: More about envvars 2023-01-09 20:33:37 +01:00
Fabian Boehm
2da1a4ae77 completions/git: Fix git-foo commands
Broken in f5711ad5ed, this neglected to
remove the `git-` part from the command

Fixes #9457.
2023-01-09 18:40:24 +01:00
Fabian Boehm
f7f052ad40 README: Link to fishshell.com instead of the design docs.
First tell people what it is instead
2023-01-09 17:44:27 +01:00
Fabian Boehm
16369a3abb docs/interactive: More on custom bindings 2023-01-08 20:36:10 +01:00
David Adam
abbb75ea66 CHANGELOG: work on 3.7.0 2023-01-08 20:37:44 +08:00
Fabian Boehm
126647380a docs: More on fish_greeting 2023-01-08 12:44:02 +01:00
Fabian Boehm
f1a150ed43 postfork: Also check if interpreter is a directory
"#!/bin/"
2023-01-08 12:44:02 +01:00
Fabian Boehm
ead0b03108 postfork: Also check shebang/interpreter for EACCESS
This happens e.g. with a shebang of "#!/bin/" - we would complain
about EACCESS, even tho accessing *the file to run* worked.
2023-01-08 12:44:02 +01:00
Fabian Boehm
afd242b14d fish_config: Skip backing up prompt
This would print an ugly but benign error
2023-01-08 12:44:02 +01:00
Fabian Boehm
9e1c8a70bf docs/string: Add a -- example to the match section
This keeps tripping people up. We can't mention it *everywhere*, but
lets see if it works just in "match", since that sees to be where
people hit it most.
2023-01-08 12:44:02 +01:00
David Adam
15939be56c Start CHANGELOG for 3.7.0 2023-01-07 23:51:19 +08:00
David Adam
31093ed9ce Merge branch 'Integration_3.6.0' 2023-01-07 22:39:31 +08:00
David Adam
af833a700d Release 3.6.0 2023-01-07 22:12:25 +08:00
Fabian Boehm
9e81d7e166 completions/conda: Fix subcommand parsing
This used the naive `__fish_seen_subcommand_from`, which isn't
powerful enough once you allow for `conda create` and `conda env
create`.

Hattip to jvanheugten for the env completions.

Fixes #9452
2023-01-07 11:23:04 +01: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
Fabian Boehm
d2f5daf8e8 bindings: If handler doesn't exist, set immediately
Fixes #9443
2023-01-02 21:44:02 +01: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
ridiculousfish
5e0f9521a5 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:26:56 -08:00
Johannes Altmanninger
92b1394178 completions/iw: add 160MHz WLAN channel 2023-01-02 18:13:47 +01:00
Dmitry Gerasimov
eb4dc101df completions/git: add "git bundle" support 2023-01-02 18:07:03 +01:00
exploide
08728be319 completions iw: added completions for iw dev set type and set channel 2023-01-02 17:53:56 +01:00
Jannik Vieten
2357c9f577
completions wireshark: removed wrong interface completion for -I option (#9440)
Wireshark completions for -I were wrong, since it doesn't take the network interface directly. It must still be specified with -i.
2023-01-02 17:45:25 +01:00
David Adam
ad46dacdad CHANGELOG: work on 3.6.0 2023-01-02 22:38:36 +08:00
Aaron Gyes
550857ef65 Remove obsolete lynx bug mitigation
a lynx-internal hash of div.contents collided with em>a which caused
built-in styling to render much of entire pages as emphasized links.

Since switching from doxygen, we haven't had a <div class="contents">
so this workaround is no longer needed.
2023-01-01 19:41:41 -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
Johannes Altmanninger
a0840637fa 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.
2023-01-01 14:37:40 +01:00
Aaron Gyes
a40b019752 __fish_use_subcommand does not take arguments.
These four completions all have a strange pattern (that doesn't
work.)

    set -l subcommands cmd1 cmd2 cmd3 ...

    complete -n "__fish_use_subcommand $subcommands" -c foo -a cmd1
    complete -n "__fish_use_subcommand $subcommands" -c foo -a cmd2
    complete -n "__fish_use_subcommand $subcommands" -c foo -a cmd3

Remove the redundant lists of subcommands and the unused argument
passed to __fish_use_subcommand for bosh, cf, mariner, and port.
2023-01-01 04:57:53 -08:00
Aaron Gyes
6ce0b93851 tinyexpr.h: rename __TINYEXPR_H__ include guard
Identifiers that start with _ or include two consecutive underscores
are reserved for the implementation
2023-01-01 03:20:01 -08:00
Aaron Gyes
fc7989cecd otool: Add completion 2022-12-31 14:49:17 -08:00
ridiculousfish
30c708e8a5 builtin_print_help to take its error argument by reference
This fixes a confusing use of pointers.
2022-12-31 10:13:03 -08:00
ridiculousfish
5c216e3d8c Remove unused 'end' variable from SHLVL calculation 2022-12-30 13:38:47 -08:00
ridiculousfish
7ff0e7d0f7 Remove bogus job_chain_is_fully_constructed declaration
This member function no longer exists.
2022-12-30 13:35:33 -08: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