Commit Graph

16671 Commits

Author SHA1 Message Date
Terje Larsen
2cd063e28b Add curl request method argument completion 2022-11-18 12:47:28 -06:00
Mahmoud Al-Qudsi
0c111b1c6b Add comments to brace expansion 2022-11-16 14:10:30 -06:00
Mahmoud Al-Qudsi
03758ce129 completions/git: Add some options for init.defaultBranch
[ci skip]
2022-11-16 12:39:47 -06:00
Fabian Boehm
b8424e425f fixup! 2
That'll teach me
2022-11-15 19:05:18 +01:00
Fabian Boehm
cb48ab882c fixup! 2022-11-15 19:03:06 +01:00
Fabian Boehm
0f8b9699a1 Fix error for {$}
Fixes #9337
2022-11-15 19:02:30 +01:00
ridiculousfish
ce2f53237e Add Dockerfiles for ARM64 and ARMv7 2022-11-12 15:20:58 -08:00
ridiculousfish
0618bb0121 Add cirrus build status README 2022-11-12 15:17:14 -08:00
ridiculousfish
246246bb5c Try to defeat pullbot-driven CI runs
Some forks of fish have outstanding PRs which trigger CI whenever we
push to main. Spare cirrus's infra by only running on fish-shell.
2022-11-12 14:43:44 -08:00
ridiculousfish
e9fde96d9c Fix the commandline test
This was tripping over < > redirections.
2022-11-12 14:25:47 -08:00
ridiculousfish
67883737c0 Add cirrus.yml
This adds a CI job script for cirrus-ci.com.

Results will be at https://cirrus-ci.com/github/fish-shell/fish-shell
2022-11-12 14:14:17 -08:00
ridiculousfish
f1e73a1839 Increase debounce timeout in debounce test
On slow machines this was spuriously failing.
2022-11-12 14:08:22 -08:00
ridiculousfish
4ab728b3a2 Reduce FISH_MAX_EVAL_DEPTH under tsan
The stack overflow tests are too slow without this.
This is because the tests are essentially quadratic: with 500 jobs, and
each job attempts to reap all jobs.
2022-11-12 14:08:22 -08:00
Johannes Altmanninger
c4a60feff1 Stop attempting to complete inside comments
Inside a comment we offer plain file completions (or command completions if
the comment is in command position). However these completions are broken
because they don't consider any of the surrounding characters. For example
with a command line

    echo # comment
              ^ cursor

we suggest file completions and insert them as

    echo # comsomefile ment

Providing completions inside comments does not seem useful and it can be
misleading. Let's remove the completions; this should communicate better that
we are in a free-form comment that's not subject to fish syntax.

Closes #9320
2022-11-12 22:37:27 +01:00
Johannes Altmanninger
c6e1704f00 pexpect test for commandline --current-process
It was not clear to me hwo this behaves when there are comments.

Include a friendly helper to compute control characters.
No functional change.
2022-11-12 22:34:31 +01:00
Johannes Altmanninger
108108bb5e completions/flatpak: remove broken version checks
flatpak completions gate some features behind checks like

    test $flatpakversion -gt 1.2

which does a floating point comparison, which is different
from version comparison.

Most of these version checks are irrelevant anyway because they check for
a version that's not even in Debian oldstable.  The only one that might be
relevant is a check for version 1.5 but that only gates some extra subcommands;
there's little harm in providing them too.

So let's just remove the version check.

Hopefully fixes #9341 (untested)

Note that flatpak upstream provides a completion file too - but it's shadowed
by ours on my system. This is a tricky issue for another day.
2022-11-12 22:31:59 +01:00
ridiculousfish
c844eea661 Restore lockthreads.yml
This file should be modified through pull requests.

This reverts commit bc71f0937b.
This reverts commit 99cac0b1b9.
This reverts commit 0f0da3c3d8.
2022-11-12 10:09:17 -08:00
Aaron Gyes
e38c9bb062 builtin set --show: put read-only part on same line. 2022-11-12 06:21:36 -08:00
Aaron Gyes
d31847b1d8 Fix apparent dyslexia 2022-11-12 05:47:27 -08:00
Aaron Gyes
bc71f0937b Revert "Set issue lock timeout back"
This reverts commit 99cac0b1b9.
2022-11-12 05:04:14 -08:00
Fabian Boehm
99cac0b1b9 Set issue lock timeout back
It is 1 whole year, for an already closed issue.

Any "engagement" that happens at that point is irrelevant to the
original issue at hand, and a new issue should be opened instead.
Increasing the grace period even further is even less likely to be helpful.
2022-11-12 12:29:22 +01:00
Aaron Gyes
0f0da3c3d8 lockthreads.yml: decrease PR threshold, increase issue threshold
In my experience we rarely see a PR that may have activity after
365 days; issue reports are a very different story.

Goal: engagement
2022-11-12 03:16:48 -08:00
Collin Styles
9a870f40c2 Add --[no-]update-refs options to git-rebase completions
These were added in git 2.38.0:
https://github.com/git/git/blob/master/Documentation/RelNotes/2.38.0.txt
2022-11-12 00:04:30 +01:00
Mahmoud Al-Qudsi
093ee6def5 Drop global variable shadowing warning on universal var unset
When unsetting, the scope indicates the scope that was *removed* not
set, so the warning is incorrectly triggered. If anything, the confusion
is now removed or we emit a warning that the variable is still present
in another scope (but don't do that!).

Closes #9338.
2022-11-10 21:25:01 -06:00
Fabian Boehm
e551f93f6d docs/set: Don't hide -u so much
It's fine if it doesn't show up in the synopsis above, but putting it
under "Notes" is just too awkward.

It's a short option that exists, and so it should be documented.
2022-11-10 11:34:50 +01:00
Aaron Gyes
6859a4c6f6 add missing space 2022-11-09 18:42:44 -08:00
Aaron Gyes
154b809c98 html docs: Make prompt (> ) portion of example code unselectable
It goofs up copy-and-pasting. Really annoying, especially
if there are multiple lines.
2022-11-09 18:31:04 -08:00
Aaron Gyes
c107b57562 fixup unintentional NOTES newline 2022-11-09 18:04:44 -08:00
Aaron Gyes
32e770a4c2 set docs: improve syopsis, fix formatting, hide -u
I tried to make the synopsis a little less theoretical with
the placeholders and instead introduced the actual scope
options, long and short once, then refer to them as -Uflg from
then on.

I mentioned that list indicies are accepted / work to erase stuff.

In the list of options, we pretend like --unexport is long-only.
Especially with --unpath and --path, and what would go wrong
if one confused it with --univeral, and how rarely it's used,
I think it's better this way. I mention it as a synonym later
in the document so that it's not literally undocumented.

Changed phrasing such as:

"Causes the specified shell variable to be given a global scope"

Which can be read as we are taking a shell variable that exists
and giving it global scope, upgrading it to global (retaining
the value).

Redid the example section using the > syntax for things entered
into a prompt, with shell output following. The explanatory

Added in missing newlines at the ends of sentences.
2022-11-09 17:50:48 -08:00
Mahmoud Al-Qudsi
51087fd39e Complete env var names and values from history 2022-11-09 15:37:40 -06:00
Mahmoud Al-Qudsi
add1df12b3 Fix env completions
Previously an environment variable to redefine would only be suggested if you
had not yet started typing one out. This makes it so that `env C<TAB>` will also
complete to, for example, [ `CC=`, `CXXFLAGS=`, ... ].

It also is smarter when suggesting variable names to complete: if a variable has
already been completed, it isn't suggested again. Additionally, it only suggests
names for variables that are exported, not all variables (the previous list was
insanely long and including things like all our `fish_...` variables).
2022-11-09 13:42:19 -06:00
Mahmoud Al-Qudsi
37b0f4dabc Document escape of new lines
I'm not sure if line continuations are covered anywhere else in the docs, but I
think the escapes section of the language page is a good place to mention them.
2022-11-09 13:01:09 -06:00
Dmitry Gerasimov
3ac6bdd437 Update tree completions
Update completions for the tree command. There are a lot of new options
were added since the 1.6.0 release (which apparently was used to create
current completions).

Options are also reordered to follow the "tree" help.
2022-11-08 20:16:24 -06:00
Fabian Boehm
311e1aa968 Revert "builtin string: push_back \n chars rather than append strings"
This reverts commit 3739c53bcf.

It misses the point of e69be38235 and reintroduces a lot of write calls.

See #9229
2022-11-07 22:37:53 +01:00
Aaron Gyes
3739c53bcf builtin string: push_back \n chars rather than append strings
prefer
    streams.out.append(foo)
    streams.out.push_back(L'\n')

vs e.g.
    foo.append(L"\n");
    streams.out.append(foo)
2022-11-07 13:34:52 -08:00
Fabian Boehm
33edac2c0c path: Show main path docs for path subcommand --help
Fixes #9334
2022-11-07 20:47:07 +01:00
exploide
ccebe1a169 completions: added systemd-cryptenroll 2022-11-06 11:38:42 -06:00
ridiculousfish
0f058039c0 Label all Docker images with their source
This labels all Docker images to refer to fish-shell
2022-11-01 16:44:52 -07:00
ridiculousfish
44d45a22e3 Rename Dockerfile tags
Remove the fish_ prefix. Instead, tag them with
ghcr.io/fish-shell/fish-ci/
2022-11-01 16:44:46 -07:00
Sergei Shilovsky
022f42c3cd Update $fish_cursor_selection_mode in vi/default bindings
Introduced with 3.6.0 `fish_cursor_selection_mode` variable breaks
existing vi bindings (for example, input sequence `abc<Esc>0vd` doesn't
delete the `a` character as would be expected).

This patch fixes it by switching `fish_cursor_selection_mode` to
`inclusive` and back.
2022-11-01 19:04:55 +01:00
Branch Vincent
aa30774b0d completions: add op 2022-11-01 19:02:32 +01:00
exploide
535bba77c4 completions: added efivar 2022-11-01 18:52:24 +01:00
Lia Lenckowski
c5a026c955 add completion for loadkeys 2022-11-01 18:51:17 +01:00
Lia Lenckowski
0a6efdc4ad fix lsblk column completion 2022-11-01 18:50:21 +01:00
Aaron Gyes
1a0d6ebe59 builtins/printf: use wcsto[i,u]max, check EINVAL, add test
This fixes #9321

IEEE Std 1003.1-2017 Issue 6 added optional error condition
[EINVAL] for if no conversion could be performed.

Switch back to wcstoimax/wcstoumax: do not work around the old FreeBSD
8 issue.

Add a test for printf '%d %d' 1 2 3
2022-10-31 19:58:18 -07:00
Mahmoud Al-Qudsi
8168ed7bf6 Test complete builtin sort of (sorted + unsorted) completions
Like the pexpect-based pager compeltions test `complete-group-order.py`, but for
the `complete` builtin. Verifies the same sort/dedup rules that apply to the
pager are also applied to the output of `complete` and asserts the sort behavior
for multiple `complete -k` calls for the same command and with the same (or with
both passing) preconditions.
2022-10-31 16:52:44 -05:00
Mahmoud Al-Qudsi
4cb19e244b Sort and deduplicate output of complete -C
This addresses a long-standing TODO where `complete -C` output isn't
deduplicated.

With this patch, the same deduplication and sort procedure that is run on actual
pager completions is also executed for `complete -C` completions (with a `-C`
payload specified).

This makes it possible to use `complete -C` to test what completions will
actually be generated by the completions pager instead of it displaying
something completely divorced from reality, improving the productivity of fish
completions developers.

Note that completions that wouldn't be shown in the pager are also omitted from
the results, e.g. `test/buildroot/` and `test/fish_expand_test/` are omitted
from the check matches in `checks/complete_directories.fish` because even if
they were generated, the pager wouldn't have shown them. This again makes
reasoning about and debugging completions much easier and more sane.
2022-10-31 16:52:36 -05:00
Mahmoud Al-Qudsi
36ae867e28 completions/git: Allow completing known values for config keys
Currently populated with support for handling just one key
(diff.algorithm) but there are others.
2022-10-31 12:45:56 -05:00
Aaron Gyes
3286c3cb6b funced: skip indent step if fish_indent not installed
Just in case.
2022-10-30 22:27:34 -07:00
Aaron Gyes
5447c130fc remove fish_key_reader finder/wrapper thing.
This was just added since "it works for fish_indent, might
as well". It's of limited utility, remove it.
2022-10-30 22:17:48 -07:00