Commit Graph

17742 Commits

Author SHA1 Message Date
Fabian Boehm
45829804af tests: Skip job_summary under ASAN in CI 2023-11-19 19:46:05 +01:00
Nater0214
1a42c97f75 completions: add checkinstall 2023-11-19 09:42:37 -08:00
ridiculousfish
c1e4a447fd Remove C++ UTF-8 bits
These are no longer used.
2023-11-18 19:21:25 -08:00
ridiculousfish
a718852ad4 Fix a typo and suppress an annoying clippy lint 2023-11-18 19:03:23 -08:00
ridiculousfish
da646a38ba Remove some unnecessary widestrs 2023-11-18 19:03:23 -08:00
ridiculousfish
f0eaa516c0 Stop boxing ParseExecutionContext
This wasn't necessary - probably a holdover from using unique_ptr in C++.
2023-11-18 19:03:23 -08:00
ridiculousfish
89376d5fd0 Fix a clippy lint 2023-11-18 19:03:23 -08:00
Johannes Stölp
1cba28c120 [doc]: fix --path description of set cmd 2023-11-18 19:00:56 -08:00
ridiculousfish
c38a7e4f84 Revert "completions: add chezmoi completions"
This reverts commit ee2c0c4a4c.

chezmoi installs completions to vendor_completions.d - unclear if we want to
ship this.
2023-11-18 18:56:55 -08:00
Jasmin Oster
ee2c0c4a4c completions: add chezmoi completions 2023-11-18 18:54:03 -08:00
a-kenji
17eadcff03 Fix small typos 2023-11-18 18:27:25 -08:00
ridiculousfish
a9f346acf0 Remove some environment and null_terminated_array ffi bits
These are now unused and can be removed.
2023-11-18 11:12:25 -08:00
ridiculousfish
377ef9786e Remove null_terminated_array C++ bits
These are now unused.
2023-11-18 10:28:52 -08:00
Johannes Altmanninger
7df70e18f4 Add hint to error message about cmdsub in command position
We might end up allowing this but let's add some help for now.

See #5575
2023-11-18 12:26:45 +01:00
Fabian Boehm
366b3f21c6 tests: Increase a sleep 2023-11-15 17:58:42 +01:00
Johannes Altmanninger
f3ce78bc53 history: remove spurious UTF-8 check regression
Closes #10102
2023-11-15 16:31:33 +01:00
Johannes Altmanninger
7f67588e63 fish_tests: label tests to indicate if they need porting 2023-11-15 11:09:48 +01:00
Johannes Altmanninger
4e37dc29dc Fix autosuggestion dropping too many keyword tokens 2023-11-15 11:09:48 +01:00
Johannes Altmanninger
6569943cb8 Port builtin read 2023-11-15 11:09:48 +01:00
Johannes Altmanninger
77aeb6a2a8 Port execution
Drop support for history file version 1.

ParseExecutionContext no longer contains an OperationContext because in my
first implementation, ParseExecutionContext didn't have interior mutability.
We should probably try to add it back.

Add a few to-do style comments. Search for "todo!" and "PORTING".

Co-authored-by: Xiretza <xiretza@xiretza.xyz>
(complete, wildcard, expand, history, history/file)
Co-authored-by: Henrik Hørlück Berg <36937807+henrikhorluck@users.noreply.github.com>
(builtins/set)
2023-11-15 11:09:48 +01:00
Johannes Altmanninger
c4155db933 Rename Rust-side parser_t/io_streams_t to Parser/IoStreams
This reduces noise in the upcoming "Port execution" commit.

I accidentally made IoStreams a "class" instead of a "struct".  Would be
easy to correct that but this will be deleted soon, so I don't think we care.
2023-11-15 11:09:48 +01:00
Johannes Altmanninger
aaa48e89a5 Temporarily rename Rust-native IoStreams to make way
The next commit will use this name.
2023-11-15 11:09:48 +01:00
Johannes Altmanninger
6280fcc8c5 Don't use virtual dispatch for OutputStream
It's not really needed since we know all specializations.
Also this allows us to define generic methods like

    fn append(&self, s: AsRef<wstr>);
2023-11-15 11:09:48 +01:00
Johannes Altmanninger
7fd4ad025a Traced refcell and mutex wrappers for debugging 2023-11-15 11:09:48 +01:00
Johannes Altmanninger
aec6b9e5e1 common: simplify a variable definition 2023-11-15 11:09:48 +01:00
Fabian Boehm
723bfb9aaf docs/complete: List --description with the options 2023-11-14 16:32:43 +01:00
Dmitriy Shishkov
bd4adf86f4 Replaced double quotation marks with single in dnf.fish completions 2023-11-12 18:35:49 +01:00
exploide
a390e36e9d completions: improved netcat completions
- fixed a copy and paste error from 7b8684e
- enhanced ncat completions
2023-11-10 15:43:39 +01:00
Fabian Boehm
67faa107b0 expand_cmdsubst: Make more errors known
These printed "Unknown error while evaluating command substitution".

Now they print something like

```
fish: for: status: cannot overwrite read-only variable
for status in foo; end
    ^~~~~^
in command substitution
fish: Invalid arguments
echo (for status in foo; end)
     ^~~~~~~~~~~~~~~~~~~~~~~^
```

for `echo (for status in foo; end)`

This is, of course, still not *great*. Mostly the `fish: Invalid
arguments` is basically entirely redundant.

An alternative is to simply skip the error message, but that requires some
more scaffolding (describe_with_prefix adds some error messages on its
own, so we can't simply say "don't add the prefix if we don't have a
message")

(cherry picked from commit 1b5eec2af6)
2023-11-09 17:51:15 +01:00
Fabian Boehm
f81c9cba50 docs: Make the vendor dirs a nested list 2023-11-07 17:55:36 +01:00
Fabian Boehm
ddd9d183e2 Document $__fish_vendor_confdirs and __fish_build_paths
Fixes #10078
2023-11-07 17:48:54 +01:00
Fabian Boehm
676da369b4 completions/dnf: Remove "offline-upgrade upgrade"
Fixes #10081
2023-11-07 17:48:54 +01:00
Fabian Boehm
8fea3cb56d docs: Fix link 2023-11-07 17:48:54 +01:00
Nicholas Rodrigues Lordello
93b3a0c1f5 Additional checks for -F support 2023-11-07 17:45:45 +01:00
Nicholas Rodrigues Lordello
5cf36bf3f8 ls No Longer Sets LS_COLORS 2023-11-07 17:45:45 +01:00
Wadii Hajji
3f7fdd5693 fix(git): add force-if-includes completion 2023-11-06 20:29:29 +01:00
Asuka Minato
754e81afa3 Update find.fish
add -D and -nowarn
2023-11-06 20:27:01 +01:00
Kid
84e6344c91 Add --verbose completion to fish_key_reader
This was missing from #8467.
2023-11-06 20:21:01 +01:00
Fabian Boehm
496fc03b98 docs: More on key timeout, key chord limitations 2023-10-24 18:25:49 +02:00
Fabian Boehm
e494e15574 funcsave: Always use local $funcdir
This abused default scope
2023-10-19 22:36:58 +02:00
Fabian Boehm
dd12f55dc2 docs/read: Specify default scope
Fixes #10061
2023-10-19 21:12:54 +02:00
Nunzio Cicone
85deb76c5f update entr completions 2023-10-18 19:09:39 +02:00
Florian Meißner
b16a869907 Fix typo in read doc 2023-10-18 19:09:11 +02:00
exploide
5d0efbf2e8 completions: added userdel from shadow-utils 2023-10-18 19:08:50 +02:00
Oliver Schrenk
631f2c073c fix typo in set -U option 2023-10-18 19:08:09 +02:00
NextAlone
7250e6fa6a
completion(loginctl): fix sessions with ssh or other states (#10038)
Signed-off-by: Next Alone <12210746+NextAlone@users.noreply.github.com>
2023-10-18 18:36:54 +02:00
Fabian Boehm
913eddbdcf docs: Underline *all* body links, not just internal ones 2023-10-18 18:35:02 +02:00
ridiculousfish
7fa3dd1747 Refresh and fix some web config bugs
Refresh some stale CSS, improve some rendering, and fix some bugs.

Some of the CSS no longer applied. Remove the bright red X in history
and use a tamer color. Fix the prev/next paginator buttons from moving
for large paginations. Fix the calculation about disabling prev/next.
2023-10-15 13:00:26 -07:00
Fabian Boehm
0f8bcb0414
wildcard: Rationalize file/command completions (#10052)
* wildcard: Remove file size from the description

We no longer add descriptions for normal file completions, so this was
only ever reached if this was a command completion, and then it was
only added if the file wasn't a regular file... in which case it can't
be an executable.

So this was dead.

* Make possible_link() a maybe

This gives us the full information, not just "no" or "maybe"

* wildcard: Rationalize file/command completions

This keeps the entry_t as long as possible, and asks it, so especially
on systems with working d_type we can get by without a single stat in
most cases.

Then it guts file_get_desc, because that is only used for command
completions - we have been disabling file descriptions for *years*,
and so this is never called there.

That means we have no need to print descriptions about e.g. broken symlinks, because those are not executable.

Put together, what this means is that we, in most cases, only do
an *access(2)* call instead of a stat, because that might be checking
more permissions.

So we have the following constellations:

- If we have d_type:
  - We need a stat() for every _symlink_ to get the type (e.g. dir or regular)
    (this is for most symlinks, if we want to know if it's a dir or executable)
  - We need an access() for every file for executables
- If we do not have d_type:
  - We need a stat() for every file
  - We need an lstat() for every file if we do descriptions
    (i.e. just for command completion)
  - We need an access() for every file for executables

As opposed to the current way, where every file gets one lstat whether
with d_type or not, and an additional stat() for links, *and* an
access.

So we go from two syscalls to one for executables.

* Some more comments

* rust link option

* rust remove size

* rust accessovaganza

* Check for .dll first for WSL

This saves quite a few checks if e.g. System32 is in $PATH (which it
is if you inherit windows paths, IIRC).

Note: Our WSL check currently fails for WSL2, where this would
be *more* important because of how abysmal the filesystem performance
on that is.
2023-10-14 08:45:15 +02:00
Johannes Altmanninger
773a507b01 fish.rs: fix regression in fish_xdm_login_hack_hack_hack_hack
This is off by one from the C++ version.

It wasn't super obvious why this worked in the first place.
Looks like args[0] is "-" because we are invoked like

    fish -c 'exec "${@}"' - "${@}"

and it looks like "-" is treated like "--" by bash, so we emulate that.
See https://github.com/fish-shell/fish-shell/issues/367#issuecomment-11740812
2023-10-13 19:58:50 +02:00