Commit graph

15198 commits

Author SHA1 Message Date
ridiculousfish
c1a1b70203 macOS: Specify hostArchitectures in osx_distribution.xml
This allows the installer to work without Rosetta 2 on Apple Silicon
Macs. Note that fish shell itself has run natively since 3.3.1 but the
installer still wanted Rosetta 2, because this key was missing.

Fixes #8566. Credit to floam for finding missing key.
2022-01-08 11:31:23 -08:00
ridiculousfish
667057cb0d macOS: go back to using Apple-provided productsign
Previously we used a hacked up 'xar' tool for signing packages,
since productsign produced a package that could not be installed on
macOS 10.11. That was fixed in Xcode 12.5 so we can just use Apple's
tools again.

See #7656.
Also see https://developer.apple.com/forums/thread/664842
2022-01-08 11:31:23 -08:00
exploide
49a9610c31 completions: complete users for id command and added two further options 2022-01-08 13:51:52 +01:00
Kid
aa6e0cc157
Skip more leading commands in __fish_man_page (#8612)
* Skip leading `xargs` in `__fish_man_page`

* Complete the list

* `git` does not qualify either
2022-01-08 13:50:31 +01:00
Kid
491dd92ac2
Add isatty completion (#8609)
* Add `isatty` completion

* Keep order
2022-01-08 13:46:54 +01:00
Kid
8aa2857c43 Clarify functions -Dv's output 2022-01-08 13:46:00 +01:00
David Adam
ec4eccce34 CHANGELOG: work on 3.4.0 2022-01-07 00:09:02 +08:00
David Adam
b4e8e5abff __fish_print_apt_packages: stringify
GNU tr is not Unicode-aware, and was corrupting descriptions that had
non-ASCII characters.

Additionally, rather than using the Unicode private use characters, use
the ASCII/UTF-8 record separator character as it was intended.

The sed command could probably be rewritten to do all the heavy lifting
here, but would be even less readable.

Closes #8575.
2022-01-06 23:55:18 +08:00
Fabian Homborg
41da16408a sample_prompts/disco: Actually use luminance for dir color
Instead of weirdly smearing the color, simply increase the values
until they are bright enough.

This prevents /tmp from being white, and guarantees visible colors for
all directories.
2022-01-05 18:14:24 +01:00
David Adam
a7b4fc3845 CHANGELOG: work on 3.4.0 2022-01-05 00:24:41 +08:00
David Adam
bd7edbcf50 Revert "Work on CHANGELOG for 3.4 (#8601)"
This reverts commit 935ec39668.

8403 was already in the ignore list and subcommands are not usually
included in the new completion list.
2022-01-04 22:35:43 +08:00
Kid
a0c2be5fc3 Fix xargs option completions 2022-01-04 19:02:08 +08:00
Ilan Cosman
935ec39668
Work on CHANGELOG for 3.4 (#8601) 2022-01-03 18:58:56 +01:00
Aaron Gyes
1552c526ba Revert "Update Mac.cmake"
This reverts commit 01919f1785.
2022-01-03 08:08:41 -08:00
David Adam
17b5647474 CHANGELOG: work on 3.4.0 2022-01-03 23:43:14 +08:00
David Adam
e86a84765f funcsave: add documentation for feature added in 3a402b19b 2022-01-03 23:03:38 +08:00
ridiculousfish
06666f3d1d CI: Set CMAKE_BUILD_PARALLEL_LEVEL to 4.
This speeds up the CI build, since before it was effectively 1.
Build times on ubuntu-latest are reduced by slightly over 2 minutes.

Note Linux CI runners are defined to have 2 cores and Mac runners 3.
2022-01-02 18:01:54 -08:00
ridiculousfish
57a9fe492e Allow using poll() to check for readability
Cygwin tests are failing because cygwin has a low limit of only 64 fds in
select(). Extend select_wrapper_t to also support using poll(), according to
a FISH_USE_POLL new define. All systems now use poll() except for Mac.

Rename select_wrapper_t to fd_readable_set_t since now it may not wrap
select().

This allows the deep-cmdsub.fish test to pass on Cygwin.
2022-01-02 16:36:33 -08:00
Johannes Altmanninger
5e67a299ae string-match.rst: fix wrong RST directive
This would show up in the rendered version.
2022-01-02 12:23:39 +01:00
Johannes Altmanninger
89b38e87bd ulimit.rst: remove spurious backtick 2022-01-02 12:23:39 +01:00
Johannes Altmanninger
b5a95317f0 index.rst: don't mention current page under "Other help pages"
This is the list of pages at the end of the introduction; no need to
link to the introduction, we're already there.
2022-01-02 12:23:39 +01:00
Johannes Altmanninger
41080c4f41 math.rst: fix typo 2022-01-02 10:14:46 +01:00
Daniil Baturin
f254692759 completions/opam: add completions for "opam switch" 2021-12-30 22:33:45 +01:00
ridiculousfish
37625053d4 fish_git_prompt: be careful about git config
fish_git_prompt may run certain git commands which may invoke certain
external programs as specified `.git/config`. Prevent this by suppressing
certain git config options.
2021-12-30 13:11:04 -08:00
ridiculousfish
a5976f5b0d Disable certain autosuggestion tests on Cygwin
Cygwin disallows backslashes in filenames, so these tests cannot
possibly succeed there. Just disable them.
2021-12-30 11:44:14 -08:00
ridiculousfish
ab7a07e97c Disable a string length test on Cygwin
This test was failing because it assumed wchar_t is 32 bit.
No functional change here.
2021-12-30 11:36:06 -08:00
Fabian Homborg
940f52d717 math: Report missing operators between the tokens
This affects the caret position. In an expression like

123 456

we previously reported:

123 456
      ^ missing operator

Now we do:

123 456
   ^ missing operator

We do it on the first space, which should be acceptable.

(no need for a changelog entry, we have already ignored #8511)
2021-12-30 13:26:44 +01:00
Fabian Homborg
2c03cfecba Shebang error: Use /path/to/fish
Otherwise this looks like `#! fish` is a valid shebang, which it is
not. We don't interpret $PATH here, and the kernel typically doesn't.
2021-12-30 13:04:47 +01:00
Ilya Grigoriev
084967e560 webconfig.py: minor polish of is_chromeos_garcon
The `name` attribute I used in commit f725cd402d
is undocumented, and [someone discovered] that it does not exist for one 
possible browser on MacOS. This should make the code work correctly even in that case. 

This probably doesn't currently cause a problem, at least when 
`isMacOS10_12_5_OrLater()` is true, because of the ordering of the if 
statements in the `runThing` function.

[someone discovered]: https://bugs.python.org/issue43424#msg409087
2021-12-30 12:55:52 +01:00
ridiculousfish
3feb41f78f Correct the test_expand test
This unit test was passing 0 instead of a pointer to indicate the end of
a varargs; this might fail on 64 bit, and indeed did fail on Cygwin. This
fixes the Cygwin expand test.
2021-12-30 01:18:14 -08:00
David Adam
a52305e11c postfork: further updates to error messages
Only show the shebang warning for .fish commands.

Use the phrase "interpreter directive" as the formal name for the
shebang.

Switch from windows to Windows for the operating system.
2021-12-29 22:33:24 +08:00
David Adam
76a336d647 CHANGELOG: work on 3.4.0 2021-12-29 18:53:38 +08:00
ridiculousfish
bbb2f5aa14 Comment why certain tests are disabled under TSAN
This makes it clear that it is due to a known limitation of TSan and not
some lurking thread safety issue.
2021-12-28 21:35:30 -08:00
ridiculousfish
ef281c7c4e Remove expand_flag::skip_home_directories
This could in principle be used to prevent home directory expansion, but
no call site uses it, so just remove it. No functional change here.
2021-12-28 15:13:50 -08:00
ridiculousfish
284427a6da Revert "Fix undefined behavior in closing a moved pipe"
There is no undefined behavior in closing a moved pipe, since the
move constructor simply sets the fd to -1, which is ignored by close().
The move constructor of autoclose_fd_t is "fully specified" (like
unique_ptr).

It's good practice to eagerly close pipes which may be inherited by
child processes, since otherwise the writer may not get EPIPE correctly.
Closing the pipe explicitly makes it clear that the pipe does not stay
open across continue_job().

This reverts commit c014c23662.
2021-12-28 14:25:24 -08:00
Johannes Altmanninger
65b34a12c0 Declare that two "not" keywords cancel each other out
"not not return 34" exits with 34, not 1.  This behavior is pretty
surprising but benign. I think it's very unlikely that anyone relies
on the opposite behavior, because using two "not" decorators in one
job is weird, and code that compares not's raw exit code is rare.

The behavior doesn't match our docs, but it's not worth changing the
docs because that would confuse newcomers. Add a test to cement the
behavior and a comment to explain this is intentional.

I considered adding the comment at
parse_execution_context_t::populate_not_process where this behavior
is implemented but the field defintion seems even better, because I
expect programmers to read that first.

Closes #8377
2021-12-28 19:32:30 +01:00
Fabian Homborg
4ceed7c482 Improve error message for fish scripts without shebang
When we execute something and it doesn't have a shebang, typically we
fall back on running it with /bin/sh. For .fish scripts, we still
refuse to do this (assuming that /bin/sh won't handle .fish scripts properly).

Only the error wasn't great. So we now explicitly mention when there's
a missing shebang, and point towards the shebang line otherwise.
2021-12-28 15:30:04 +01:00
David Adam
a9f6a38e37 CHANGELOG: work on 3.4.0 2021-12-28 14:03:11 +08:00
David Adam
3bb7f51691 CHANGELOG: work on 3.4.0 2021-12-28 12:57:34 +08:00
Nils K
1877253f47
Pass all of $argv to pk-command-not-found (#8591)
Fixes #8579.
2021-12-28 12:56:31 +08:00
Johannes Altmanninger
ac428b23e5 completions/git: use our __fish_git wrapper for listing config values
Git completions use wrapper function __fish_git instead of directly
running git. This allows them to be aware of Git's global options, like
--git-dir. Let's use __fish_git also for listing config keys & values,
so it can more accurately list local (= per repo) git configuration.
2021-12-27 14:41:59 +01:00
Johannes Altmanninger
ee3a26d849 completions/git: fix completions for "git config"
We don't provide completions on "git config " because we require
"fish_is_nth_token 3". Confusingly, fish_is_nth_token only counts
tokens *before* the cursor, so 2 is the right number here.

While at it, fix a typo and delete an unused completion entry (it
ran conditional on __fish_is_first_arg, which is always false for a
git subcommand).
2021-12-27 14:41:24 +01:00
David Adam
2e6bfe5c68 fish_tests: actually test fish_wcstod
The test was running against the standard library rather than the fish
replacement.
2021-12-27 14:07:17 +08:00
Kid
36be635393
Provide completions for complete without -c (#8587) 2021-12-26 13:49:28 -08:00
Kid
8abc6b2f8c
Provide completions for history without search subcommand (#8588) 2021-12-26 13:48:49 -08:00
Sergei Morozov
69b5a3535c
Add basic completion for mvn -pl switch (#8570)
This patch introduces basic completion of the -pl|--projects switch for
mvn. The implementation is quite naive but it's better than nothing. A more
robust implementation would require either scanning the filesystem or running
mvn which might slow down completion significantly.
This solution can be improved by using an XML parser instead of grep/sed.
2021-12-26 22:37:13 +01:00
Marco Scardovi
1e503745a1
Update fish.desktop (#8584)
Update .desktop file (fish/Fish and added comment)
2021-12-25 23:52:54 -08:00
Aaron Gyes
29ccc08a53 unusued find_entry member: use it
Assuming this was meant to be used when created, simplify
two other spots to make use of find_entry().
2021-12-24 19:06:00 -08:00
Aaron Gyes
4efb1b1644 math.rst: use definition lists.
Also, follow the one-line per sentence rule as that has semantic
meaning for man/groff.
2021-12-24 16:39:47 -08:00
Aaron Gyes
a16fd0baa4 Update synopsis of a few stragglers. 2021-12-24 16:15:40 -08:00