Commit Graph

16731 Commits

Author SHA1 Message Date
Shun Sakai
4497f58b3e Update completions for pandoc (#9651)
- Change completions for input formats, output formats and highlight
  styles to dynamically complete
- Add more valid PDF engines

(cherry picked from commit 1a7e3024cc)
2023-03-10 16:53:17 -06:00
Fabian Boehm
fdd9fe27b8 CHANGELOG 2023-03-05 16:10:50 +01:00
Xiretza
b1dc7e8697 builtins: set_color: remove unhandled -v/--version flag
Invoking `set_color -v` crashes fish.

(cherry picked from commit dd7b177d72)
2023-03-05 16:09:47 +01:00
Agatha Lovelace
77c92d80ab support prepending please instead of sudo/doas
(cherry picked from commit e32e6daced)
2023-03-05 16:09:47 +01:00
Fabian Boehm
74969f94fe CHANGELOG 2023-03-03 19:25:36 +01:00
Maurizio De Santis
b567bf5652 Fix typo
(cherry picked from commit 68ba30d8c8)
2023-03-03 19:25:21 +01:00
Fabian Boehm
2b0f051eba CHANGELOG 2023-03-03 18:44:09 +01:00
mhmdanas
2d80ed36f8 xbps: actually show all packages in __fish_print_xbps_packages's output.
`xbps-query` actually parses `-Rsl` as `-Rs l`, which means that packages
without the letter "l" in their names or descriptions are not included in
`__fish_print_xbps_packages`'s output.

(cherry picked from commit 0f39de2eee)
2023-03-03 18:07:49 +01:00
Fabian Boehm
3bf3061d8c CHANGELOG 2023-03-02 16:35:08 +01:00
Fabian Boehm
37575c5f79 reader: Remove assert in history search
This isn't a great use of `assert` because it turns a benign "oh I
need to search again" bug into a crash.

Fixes #9628

(cherry picked from commit 7c91d009c1)
2023-03-02 16:34:19 +01:00
Fabian Boehm
1a20184ba4 Silence ENODEV errors for fstatat
Some broken gdrive filesystem can return these.

Fixes #9550

(cherry picked from commit e90f003d2d)
2023-02-27 22:40:59 +08:00
Fabian Boehm
338451c25c webconfig: Set a variable before
This fixes things if a theme is entirely empty.

Fixes #9590

(cherry picked from commit acde38fed3)
2023-02-27 22:40:59 +08:00
Fabian Boehm
17332226e4 __fish_complete_directories: Use an empty command as the dummy
Fixes #9574

(cherry picked from commit 200095998a)
2023-02-27 22:40:59 +08:00
Fabian Boehm
2419f39cfd fish_git_prompt: Allow counting stash without full informative
Fixes #9572

(cherry picked from commit 5aaa1e69bc)
2023-02-27 22:40:58 +08:00
Fabian Boehm
822203d7b0 share/config: Erase on_interactive before doing __fish_config_interactive
This removes a possibility of an infinite loop where something in
__fish_config_interactive triggers a fish_prompt or fish_read event,
which calls __fish_on_interactive which calls
__fish_config_interactive again, ...

Fixes #9564

(cherry picked from commit 7ac2fe2bd3)
2023-02-27 22:40:58 +08:00
Fabian Boehm
fdf075149f man: Reroute ".",":","[" to the proper names
Fixes #9552

(cherry picked from commit 8ff78eddf0)
2023-02-27 22:40:58 +08:00
David Adam
9f83155fca CHANGELOG: work on 3.6.1 2023-02-27 22:27:15 +08:00
Shun Sakai
76d9de6282 Add completions for scrypt
(cherry picked from commit 189f4ca3c3)
2023-02-27 22:25:49 +08:00
bagohart
89880839e8 Add tab completion for stow (#9571)
(cherry picked from commit 3dd8db281b)
2023-02-27 22:25:26 +08:00
matt wartell
38afce70da fix 3 instances of old command substitution $()
(cherry picked from commit 904839dcce)
2023-02-27 22:25:26 +08:00
Jay
c42c3ebe6f completions/trash-cli: add completions for trash-cli (#9560)
Add completions for trash-cli commands:
trash, trash-empty, trash-list, trash-put and trash-restore.

``trash --help`` are used to identify the executable in trash cli completion.

(cherry picked from commit ce268b74dd)
2023-02-27 22:25:24 +08:00
NextAlone
c8526bfe4d completions/apkanalyzer: add completion for apkanalyzer
Signed-off-by: NextAlone <12210746+NextAlone@users.noreply.github.com>
(cherry picked from commit 176097cc49)
2023-02-27 22:24:56 +08:00
Delapouite
c11f2cf664 completions/systemctl: add import-environment command
Man page reference:
https://man.archlinux.org/man/systemctl.1#Environment_Commands

(cherry picked from commit a29d760ca0)
2023-02-27 22:24:56 +08:00
bagohart
3fa5a808a0 Add separate completions for neovim (#9543)
Separate the neovim completions from the vim ones, as their supported
options have diverged considerably.

Some documented options are not yet implemented, these are added but
commented out.

Closes #9535.

---------

Co-authored-by: Mahmoud Al-Qudsi <mqudsi@neosmart.net>
(cherry picked from commit ef07e21d40)
2023-02-27 22:24:52 +08:00
Fabian Boehm
a48c787439 Add workaround for Midnight Commander's issue with prompt extraction
When we draw the prompt, we move the cursor to the actual
position *we* think it is by issuing a carriage return (via
`move(0,0)`), and then going forward until we hit the spot.

This helps when the terminal and fish disagree on the width of the
prompt, because we are now definitely in the correct place, so we can
only overwrite a bit of the prompt (if it renders longer than we
expected) or leave space after the prompt. Both of these are benign in
comparison to staircase effects we would otherwise get.

Unfortunately, midnight commander ("mc") tries to extract the last
line of the prompt, and does so in a way that is overly naive - it
resets everything to 0 when it sees a `\r`, and doesn't account for
cursor movement. In effect it's playing a terminal, but not committing
to the bit.

Since this has been an open request in mc for quite a while, we hack
around it, by checking the $MC_SID environment variable.

If we see it, we skip the clearing. We end up most likely doing
relative movement from where we think we are, and in most cases it
should be *fine*.

(cherry picked from commit b1b2294390)
2023-02-27 22:24:13 +08:00
Dmitry Gerasimov
e92eec1ab1 completions/meson: rewrite meson completions (#9539)
Rewrite completions for meson to expose meson commands with their
options and subcommands. New completions are based on the meson 1.0.

Subcommands were introduced in meson 0.42.0 (August 2017), so new
completions will only work for versions after 0.42.0. At this moment,
even oldstable Debian (buster) has meson 0.49.2 -- which means it is
unlikely someone will be affected.

---------

Co-authored-by: Mahmoud Al-Qudsi <mqudsi@neosmart.net>
(cherry picked from commit c3a72111e9)
2023-02-27 22:24:13 +08:00
Branch Vincent
ceb0389e83 completions: add pre-commit
(cherry picked from commit d69a290c2f)
2023-02-27 22:24:13 +08:00
NextAlone
7776bba8b5 completion/adb: remove wait-for-device from subcommand detect
wait-for-device should not be used in subcommand detect, cause it is used as seperate command, following with others.

(cherry picked from commit 3604e8854b)
2023-02-27 22:24:13 +08:00
David Adam
f59edf23d0 CHANGELOG: work on 3.6.1 2023-02-21 22:06:32 +08:00
Wout De Puysseleir
d55ac1fb94 completions/mix: Add mix phx
- Added phx completions. These are very common completions for the Elixir Phoenix Framework.
  Documentation can be found here: https://hexdocs.pm/phoenix/1.7.0-rc.2/Mix.Tasks.Local.Phx.html#content
- Added argument completions
- Made all descriptions start with an uppercase for better consistency
- Update CHANGELOG.rst

(cherry picked from commit 43a7c20ddb)
2023-02-21 21:54:14 +08:00
David Adam
d0f1d5e595 docs/index: update some formatting from #9482
(cherry picked from commit e20d78431b)
2023-02-21 21:18:03 +08:00
Fabian Boehm
308e0ceb9d __fish_complete_path: Also use an empty command
This removes a weird `ls` call (that just decorates directories), and
makes it behave like normal path completion.

(really, this should be a proper option to complete)

Fixes #9285

(cherry picked from commit 4a8ebc0744)
2023-02-21 20:52:14 +08:00
David Adam
61b87f585d debian packaging: add dependency on procps
See https://bugs.debian.org/1029940

(cherry picked from commit 2a24295e50)
2023-01-29 21:21:57 +08:00
Johannes Altmanninger
2e30403f98 completions/git: also complete filepaths as second argument to git grep
Fixes a regression in f81e8c7de (completions/git: complete refs for "git
grep", 2022-12-08).

Fixes #9513

(cherry picked from commit 243ade838b)
2023-01-28 21:26:36 +01:00
Johannes Altmanninger
847119a65d completions/git: use builtin path for finding subcommands
This is more elegant and efficient. No functional change.

As suggested by 2da1a4ae7 (completions/git: Fix git-foo commands, 2023-01-09).

(cherry picked from commit befa240756)
2023-01-24 20:41:06 +01:00
Johannes Altmanninger
c8da990652 completions/git: fix typo
(cherry picked from commit f033b4df7d)
2023-01-24 20:41:06 +01:00
Johannes Altmanninger
c97a922d35 completions/git: do not use user input as format string
Suggested by f5711ad5e (git.fish: collapse repeat complete cmds, set -f,
rm unneeded funcs, 2022-10-27).

(cherry picked from commit 7c1c3f9f77)
2023-01-24 20:41:06 +01:00
Johannes Altmanninger
b65974bb0a Revert "git.fish: collapse repeat complete cmds, set -f, rm unneeded funcs"
That commit did way too many things, making it hard to see the 5 regressions
it introduced. Let's revert it and its stragglers. In future, we could redo
some of the changes.

Reverts changes to share/completions/git.fish from

- 3548aae55 (completions/git: Don't leak submodule subcommands, 2023-01-23)
- 905f788b3 (completions/git: Remove awkward newline symbol, 2023-01-10)
- 2da1a4ae7 (completions/git: Fix git-foo commands, 2023-01-09)
- e9bf8b9a4 (Run fish_indent on share/completions/*.fish, 2022-12-08)
- d31847b1d (Fix apparent dyslexia, 2022-11-12)
- 054d0ac0e (git completions: undo mistaken `set -f` usage, 2022-10-28)
- f5711ad5e (git.fish: collapse repeat complete cmds, set -f, rm unneeded funcs, 2022-10-27)

(cherry picked from commit 72e9d02650)
2023-01-24 20:41:06 +01:00
Fabian Boehm
6a982fe71f completions/git: Some rewordings
These are the longest subcommand descriptions, so it gives us more space

(cherry picked from commit 21f1eebd01)
2023-01-23 21:18:57 +01:00
Fabian Boehm
88d3803503 completions/git: Don't leak submodule subcommands
Introduced in f5711ad5ed through an unclean edit.

(cherry picked from commit 3548aae552)
2023-01-23 21:18:57 +01:00
Fabian Boehm
ef5b29652f Fix last PCRE2_UCHAR32
See #9502

(cherry picked from commit bd871c5372)
2023-01-23 20:04:43 +01:00
Fabian Boehm
b4ee54dc68 CHANGELOG: Open up 3.6.1 2023-01-22 19:06:12 +01:00
Fabian Boehm
9043008933 abbr: Clarify universal variable message
And give explicit upgrade instructions.
2023-01-21 16:53:59 +01:00
Fabian Boehm
01d681067c Bind ctrl-g to cancel as well
Classic emacs thing and the chord is so far unused.

Fixes #9484
2023-01-21 13:35:22 +01:00
Fabian Boehm
52d2087dd3 re: Use the variable-width pcre2 type
This was what we always did in string. It makes it match the
annoyingly variable width of wchar_t.

Fixes #9502
2023-01-21 10:49:44 +01:00
Mahmoud Al-Qudsi
9b4c4ee7b6 Don't use sort for fail2ban-client completions
As pointed out by faho, the completions will be deduplicated by the completion
mechanics. We don't use this list directly except to pass it up the chain to the
shell, so there's no benefit to shelling out to eagerly deduplicate the list.

Plus, as of 3.6.0, even manual `complete -C"..."` invocations now deduplicate
results the same as if completions were triggered.
2023-01-19 17:51:22 -06:00
Mahmoud Al-Qudsi
031a6a09a4 Add completions for fail2ban-client
`fail2ban-client` uses nested subcommand syntax and intermixes fixed/enumerable
values with dynamically detected ones. If you know exactly what your overall
command structure looks like, these completions will work great. Unfortunately
their discoverability is a bit lacking, but that's not really fish's fault.

e.g.

* `f2b-c get/set` take certain known values but also accepts a dynamic jail name
* `f2b-c get/set <jail>` take certain fixed options but...
* `f2b-c get/set <jail> action` require enumerating an entirely different set
  of values to generate the list of completions, bringing us to...
* `f2b-c get <jail> action <action>` has a fixed number of options but
* `f2b-c set <jail> action <action> <property>` can be any valid command and its
  arguments

The intermixing of fixed, enumerable, and free-form inputs in a single command
line is enough to make one's head spin!
2023-01-19 12:53:40 -06:00
Kevin F. Konrad
9ee82b143a fix missing required parameter in terraform completions 2023-01-19 17:14:04 +01:00
Fabian Boehm
f9f29f0737 completions/portage: Fix errors with unreadable files
This could occur if a non-readable location was mentioned in one of
the portage config files.

Fixes #9495
2023-01-19 17:13:13 +01:00
mattmc3
cd17c1281d
Add argparse validation examples (#9483)
* Add argparse validation examples

* Remove invalid example
2023-01-19 11:06:51 +01:00