Commit Graph

16684 Commits

Author SHA1 Message Date
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
Fabian Boehm
9ef7fe1a15 Make one error translatable
This is now the same as in `read`
2023-01-13 17:57:04 +01:00
Fabian Boehm
dad8c527e0 read: Error on read-only variables
Fixes #9346
2023-01-13 17:56:28 +01:00
Fabian Boehm
1b1cf73b60 abbr: Stop escaping the name for abbr --list
This is so we can pass it to `abbr --erase`.

Fixes #9470
2023-01-13 16:38:34 +01:00
Fabian Boehm
572a568268 abbr: Erase the old universal variable with abbr --erase
This means cleaning out old universal variables is now just:

```fish
abbr --erase (abbr --list)
```

which makes upgrading much easier.

Note that this erases the currently defined variable and/or any
universal. It doesn't stop at the former because that makes it *easy*
to remove the universals (no running `abbr --erase` twice), and it
doesn't care about globals because, well, they would be gone on
restart anyway.

Fixes #9468.
2023-01-13 16:09:53 +01:00
shenleban tongying
27952db9f7 docs: clearify global vs universal variable 2023-01-13 15:58:37 +01:00
Fabian Boehm
4ceb497bfb webconfig: Remove the abbreviations tab
Since the new expanded abbreviations in 3.6.0, abbr no longer accepts
new universal variables. That means this tab is now
non-functional (except that it could technically remove abbrs that
were set in universal variables).

Because making it work with the expanded abbreviations requires some
awkwardness like a dedicated conf.d snippet (or writing into
config.fish!), we simply remove it.
2023-01-11 08:25:45 +01:00
Fabian Boehm
1d29ae7847 docs: Document more vi-mode bindings
These are quite incomplete and need more work.
2023-01-10 20:36:59 +01:00
Fabian Boehm
905f788b3e completions/git: Remove awkward newline symbol
Konsole draws ⏎  with a width of 2, but widechar_width says it's 1.
That leads to awkward display.

It's also a surprising and distracting symbol in this use.

So just use spaces.
2023-01-10 19:27:16 +01:00
Fabian Boehm
1d455be9fa Cleanup 2023-01-09 22:53:34 +01:00
Fabian Boehm
96c9cb369b CHANGELOG 2023-01-09 21:41:53 +01:00
Fabian Boehm
5792e4a12b
Make history pager use more entries (#9458)
Like I mentioned in #9089, 12 entries is a bit few.

So, instead, we do like we do for completions before disclosing and
pick half the screen (but at least X, in this case 12).

This avoids filling the entire screen, and will avoid an unsightly "X
more entries" (which requires scrolling down to fully disclose)
because it matches what the pager does.

Note: For multiline commands we can be pushed further upwards, and in
case of a multi-column layout we could fit more lines. That would
require asking the pager to fit as many as possible and give us back
the index of the last matching entry and rewinding the history search.

That's gonna be left as an exercise for later if it turns out to be necessary.
2023-01-09 21:39:55 +01:00
Fabian Boehm
51bce422fd docs: More about envvars 2023-01-09 20:33:37 +01:00
Fabian Boehm
2da1a4ae77 completions/git: Fix git-foo commands
Broken in f5711ad5ed, this neglected to
remove the `git-` part from the command

Fixes #9457.
2023-01-09 18:40:24 +01:00
Fabian Boehm
f7f052ad40 README: Link to fishshell.com instead of the design docs.
First tell people what it is instead
2023-01-09 17:44:27 +01:00
Fabian Boehm
16369a3abb docs/interactive: More on custom bindings 2023-01-08 20:36:10 +01:00
David Adam
abbb75ea66 CHANGELOG: work on 3.7.0 2023-01-08 20:37:44 +08:00
Fabian Boehm
126647380a docs: More on fish_greeting 2023-01-08 12:44:02 +01:00
Fabian Boehm
f1a150ed43 postfork: Also check if interpreter is a directory
"#!/bin/"
2023-01-08 12:44:02 +01:00
Fabian Boehm
ead0b03108 postfork: Also check shebang/interpreter for EACCESS
This happens e.g. with a shebang of "#!/bin/" - we would complain
about EACCESS, even tho accessing *the file to run* worked.
2023-01-08 12:44:02 +01:00
Fabian Boehm
afd242b14d fish_config: Skip backing up prompt
This would print an ugly but benign error
2023-01-08 12:44:02 +01:00