Commit Graph

16754 Commits

Author SHA1 Message Date
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
Eddie Lebow
1564c3e181 Minor formatting in Job Control documentation 2023-01-18 22:20:16 +01:00
NaLan ZeYu
093c580b5c Add completion for proxychains 2023-01-18 18:27:07 +01:00
Fabian Boehm
fd8291a96f __fish_print_help: Respect $MANPAGER
Fixes #9488
2023-01-18 17:05:39 +01:00
Fabian Boehm
48db9e6a3f tests/signals.py: Increase a sleep 2023-01-18 16:48:49 +01:00
Fabian Boehm
83d95cea35 docs: Reword quotes
Also explain that `$(foo)` is also done in double-quotes.
2023-01-18 16:39:37 +01:00
Fabian Boehm
772a367365 prompts/disco: Use $fish_color_status for the status
That's what it's for.
2023-01-17 21:31:47 +01:00
Fabian Boehm
69b28fc490 themes/coolbeans: Set fish_color_status to something less obtrusive
Similar to when we changed the color to the default mode-prompt.

I didn't notice that because my prompt uses $fish_color_error here, so
I reused the same color.
2023-01-17 21:30:47 +01:00
Fabian Boehm
d952ca1d1e docs: Rename "index range expansion" to "slices"
It's a simpler term.
2023-01-17 17:08:10 +01:00
Fabian Boehm
dda0c8178d docs: Remove "Variable scope for functions" chapter
This didn't need to be separately.

Also rename "More on universal variables" because it's the chapter on
universal variables.
2023-01-17 17:04:56 +01:00
Johannes Altmanninger
e84f588d11 reader: make Escape during history search restore commandline again
Commit 3b30d92b6 (Commit transient edit when closing pager, 2022-08-31)
inadvertently introduced two regressions to history search:

1. It made Escape keeps the selected history entry,
   instead of restoring the commandline before history search.
2. It made history search commands add undo entries.

Fix both of this issues.
2023-01-17 09:31:04 +01:00
Fabian Boehm
00d7b817aa CHAAAAAAAAANNNNGEEEELOOOOOOOGGG 2023-01-16 21:11:45 +01:00
Fabian Boehm
72a7111260 docs: Revise command substitution section 2023-01-16 18:36:59 +01:00
Fabian Boehm
21026421a0 CONTRIBUTING: More on completions 2023-01-16 18:24:42 +01:00
Austin Ziegler
bb6160bae4 Fix open completion for macOS
macOS 11+ (possibly 12+) has an additional place where certain
applications will be installed, `/System/Applications`. This is a sealed
system volume and includes the following applications:

- `App Store.app`
- `Automator.app`
- `Books.app`
- `Calculator.app`
- `Calendar.app`
- `Chess.app`
- `Clock.app`
- `Contacts.app`
- `Dictionary.app`
- `FaceTime.app`
- `FindMy.app`
- `Font Book.app`
- `Freeform.app`
- `Home.app`
- `Image Capture.app`
- `Launchpad.app`
- `Mail.app`
- `Maps.app`
- `Messages.app`
- `Mission Control.app`
- `Music.app`
- `News.app`
- `Notes.app`
- `Photo Booth.app`
- `Photos.app`
- `Podcasts.app`
- `Preview.app`
- `QuickTime Player.app`
- `Reminders.app`
- `Shortcuts.app`
- `Siri.app`
- `Stickies.app`
- `Stocks.app`
- `System Settings.app`
- `TextEdit.app`
- `Time Machine.app`
- `TV.app`
- `Utilities`
- `VoiceMemos.app`
- `Weather.app`

The change here adds `/System/Applications` to the search locations for
`-a` and `-b` options on the macOS completions for `open`. There are
possibly other locations that may be considered (I’m not using `mdls` or
`mdfind` in my functions for "reasons"), but this is partially based on
https://github.com/halostatue/fish-macos/blob/main/functions/__macos_app_find.fish
2023-01-16 18:07:49 +01:00
Fabian Boehm
97bef63af6 docs: Add more on conditionals 2023-01-16 17:53:08 +01:00
Fabian Boehm
78cc872904 Remove dangling footnote reference 2023-01-16 17:42:00 +01:00
Fabian Boehm
dc51a12b4f docs: Mention env
Fixes #9482
2023-01-16 17:09:33 +01:00
Fabian Boehm
6df09b3753
completions: Offer ../ and ./ again (#9477)
Inadvertently broken in a2d816710f,
this made `cd .` no longer offer `cd ../` (same for general file completions
like `ls .`, which only offers dotfiles)
2023-01-16 10:05:01 +01:00
Mahmoud Al-Qudsi
256713b670 Add missing completion for status current-commandline
`status current-commandline` shipped in fish 3.6.0 but we missed adding this
completion.
2023-01-15 18:04:52 -06:00
Fabian Boehm
077118d983 abbr: Fix crash when no name has been given
This crashed for

```fish
abbr --add --regex '{\d+..\d+}' --function foo
```

i.e. a regex and a function but no name - that's 0 additional
arguments.
2023-01-15 10:50:09 +01:00
Fabian Boehm
f6f10353be Ye olde CHANGELOGE 2023-01-14 22:38:21 +01:00
Fabian Boehm
da0c640750 abbr: Warn when -U is given
This prints a warning to stderr and then still does the thing.

Because of the error trailer, it points to the abbr help page.
2023-01-14 22:27:28 +01:00
Fabian Boehm
5c56fa0e6f Remove str2wcs special case for MB_CUR_MAX
This meant we didn't actually do our weird en/decoding scheme for e.g.
a C locale, which meant that, when you then switch to a proper locale
the previous variables were broken.

I don't know how to test this automatically - none of my attempts seem
to ever *fail* with the old code, here's what you'd do manually:

- Run fish with an actual C locale (LC_ALL=C
fish_allow_singlebyte_locale=1 fish)
- `set -gx foo 💩`
- `set -e LC_ALL`
- `echo $foo` outputs "💩" if it works and "ð⏎" if it's broken.

Fixes #2613
2023-01-14 22:27:16 +01:00
ridiculousfish
7fa13e4451 Remove enum_iter_t
This was unused.
2023-01-14 12:58:20 -08:00
Fabian Boehm
8203fdf631 docs/abbr: Just explain right out that uvars don't work anymore 2023-01-14 14:19:46 +01:00
Fabian Boehm
a322e3f180 docs: Fix typo 2023-01-13 22:53:02 +01:00
Fabian Boehm
b9adb8466f CHANGELOG 2023-01-13 18:05:00 +01:00