Commit Graph

491 Commits

Author SHA1 Message Date
David Adam
8c4c526698 ulimit: add new limits from FreeBSD/NetBSD
Short option names are taken from sh for those platforms where possible.
2022-03-24 10:23:04 +08:00
David Adam
2c2b87af07 ulimit: add new limits from Linux
Short options are taken from prlimit(1) where appropriate.

Closes #8786.
2022-03-24 10:23:04 +08:00
Fabian Homborg
f184061c16 CHANGELOG 2022-03-22 22:10:28 +01:00
ridiculousfish
d0d5c62ec7 Fix case-changing autosuggestions generated mid-token
This fixes a bug where a case-changing autosuggestion generated from the
middle of a token would append too much to the end of the token.

Fixes #8820
2022-03-20 20:16:01 -07:00
Fabian Homborg
12862b11cf CHANGELOG: Reword escape sequence thing 2022-03-20 20:23:49 +01:00
Fabian Homborg
166d4846ee CHANGELOG 2022-03-20 17:08:01 +01:00
pagedown
f8163f5d22 CHANGELOG 2022-03-20 16:33:13 +01:00
ridiculousfish
3e5284aaf2 Stop restoring tty modes when run non-interactively
fish reads the tty modes at startup, and tries to restore them to the
original values on exit, to be polite. However this causes problems when
fish is run in a pipeline with another process which also messes with the
tty modes. Example:

    fish -c 'echo foo' | vim -

Here vim's manipulation of the tty would race with fish, and often vim
would end up with broken modes.

Only restore the tty if we are interactive. Fixes #8705.
2022-03-19 14:55:54 -07:00
ridiculousfish
df2cbe321c Refactor tty transfer to be more deliberate
This is a big cleanup to how tty transfer works. Recall that when job
control is active, we transfer the tty to jobs via tcsetpgrp().

Previously, transferring was done "as needed" in continue_job. That is, if
we are running a job, and the job wants the terminal and does not have it,
we will transfer the tty at that point.

This got pretty weird when running mixed pipelines. For example:

    cmd1 | func1 | cmd2

Here we would run `func1` before calling continue_job. Thus the tty
would be transferred by the nested function invocation, and also restored
by that invocation, potentially racing with tty manipulation from cmd1 or
cmd2.

In the new model, migrate the tty transfer responsibility outside of
continue_job. The caller of continue_job is then responsible for setting up
the tty. There's two places where this gets done:

1. In `exec_job`, where we run a job for the first time.

2. In `builtin_fg` where we continue a stopped job in the foreground.

Fixes #8699
2022-03-19 14:48:36 -07:00
Fabian Homborg
7935b7327e CHANGELOG 2022-03-17 18:21:43 +01:00
Fabian Homborg
2f7a73381a CHANGELOG 2022-03-16 20:16:05 +01:00
Fabian Homborg
d34ebe94ca CHANGELOG 2022-03-15 17:39:44 +01:00
Andrey Mishchenko
dc5bdda8e0 Remove underscores-in-math-builtin entry from 3.4 changelog 2022-03-13 19:24:54 +01:00
Fabian Homborg
97127c3e03 CHANGELOG 2022-03-13 11:49:39 +01:00
Fabian Homborg
ffdbc5a1b2 CHANGELOG 2022-03-13 11:41:38 +01:00
Andrey Mishchenko
59e50f77bc
Allow underscores as separators in the math builtin (#8611)
* Implement fish_wcstod_underscores

* Add fish_wcstod_underscores unit tests

* Switch to using fish_wcstod_underscores in tinyexpr

* Add tests for math builtin underscore separator functionality

* Add documentation for underscore separators for math builtin

* Add a changelog entry for underscore numeric separators
2022-03-13 11:23:35 +01:00
David Adam
c7e4350ab6 Release 3.4.0
Fixes #8092.
2022-03-12 22:30:41 +08:00
David Adam
c6d68b4593 CHANGELOG: work on 3.4.0 2022-03-12 22:28:54 +08:00
Ilan Cosman
1edb642abe Ignore own PR 2022-03-12 22:25:33 +08:00
Ilan Cosman
1e714f9d13 Changelog for 3.4 2022-03-12 22:25:33 +08:00
David Adam
895039ea5a CHANGELOG: work on 3.4.0 2022-03-10 23:41:38 +08:00
Fabian Homborg
68ef336683 Logging changes 2022-03-05 20:50:38 +01:00
Fabian Homborg
456359f78d CHANGELOGGE 2022-03-03 12:20:03 +01:00
Ilan Cosman
6c846cc256 Changelog for 3.4 2022-03-03 12:18:45 +01:00
Kevin F. Konrad
707c7a7f1e replace helm completions with autogenerated script
Helm 3 provides an autogenerated completion since version 3.4.0.

The previous implementation is replaced by this because it was specific to the
now-deprecated helm 2.

The completions appear to be fully featured including descriptions and
completion for dynamic arguments such as namespaces and releases.
2022-02-13 16:52:30 +01:00
Johannes Altmanninger
47b0d0c293 Make __fish_is_nth_token and __fish_nth_token private again
Their names are not perfect, so let's keep them as internal functions,
until we figure out how/if we want to expose this.

This reverts 0445126c2 (Undunder __fish_is_nth_token, 2021-06-29) (but I
did it without "git revert").

Closes #8008
2022-02-13 10:45:38 +01:00
Pierrick Guillaume
2164d40b73
Allow better completion for git submodules (#8716)
* Allow better completion for git submodules

* Add change for git completion in changelog

* Fix git submodule absobgitdirs description
2022-02-11 15:56:14 +01:00
Nadav Zingerman
9e0f74eb6c Add --escape option to complete -C
An example use case is an external completion pager:

    bind \cg "commandline -rt (complete -C --escape|fzf|cut -d\t -f1)\ "

Fixes #3469
2022-02-09 08:34:03 +01:00
Mahmoud Al-Qudsi
4ea5a8a5c6 CHANGELOG.rst: Add vim text width override
If you have vim set up to recognize `.editorconfig` files, the 80-char limit
from ours causes vim to keep chopping lines. This makes it ignore that limit
when editing `CHANGELOG.rst`
2022-02-08 14:37:23 -06:00
Mahmoud Al-Qudsi
ddc4d8ba9b Changelog: fish_is_nth_token + fish_nth_token
See re-opened issue #8008 for discussion regarding the name of these functions -
this might need to be revisited pending a decision there.
2022-02-08 14:17:00 -06:00
Mahmoud Al-Qudsi
497cebab64 Changelog: OpenZFS completion improvements 2022-02-08 14:17:00 -06:00
Shay Aviv
2ef12af60e Fix comment parsing inside command substitutions and brackets 2022-02-08 16:20:31 +01:00
ridiculousfish
1bdd629326 Prevent signals from tearing multi-char bindings
Say the user has a multi-char binding (typically an escape sequence), and a
signal arrives partway through the binding. The signal has an event handler
which enques some readline event, for example, `repaint`. Prior to this
change, the readline event would cause the multi-char binding to fail. This
would cause bits of the escape sequence to be printed to the screen.

Fix this by noticing when a sequence was "interrupted" by a non-char event,
and then rotating a sequence of such interruptions to the front of the
queue.

Fixes #8628
2022-02-05 13:18:36 -08:00
Emily Grace Seville
1b12719364 Extend mono completions
Work on mono.fish
- rewrite runtime option completions

Add new mono tools:
- gacutil
- xsp
- mkbundle
- ilasm
- monodis
- ikdasm
- monop
- sqlsharp
- gendarme
- csharp

Closes #8452
2022-02-05 20:09:45 +01:00
David Adam
065b769c1d CHANGELOG: work on 3.4.0 2022-02-03 22:42:24 +08:00
Aaron Gyes
a03e245e13
Update CHANGELOG.rst 2022-02-01 00:47:18 -08:00
ridiculousfish
30216b2d62 CHANGELOG: new Windows command completions
This relnotes completions from #8486
2022-01-26 22:18:20 -08:00
Johannes Altmanninger
df3b0bd89f Fix commandline state for custom completions with variable overrides
Today, a command like "var=val status " has custom completions
because we skip over the var=val variable override when detecting
the command token.
However if the custom completions read the commandline state (via
"commandline -opc") they do see they variable override, which breaks
them, most likely. Try "a=b git ".

For completions of wrapped commands, we already set a transient
commandline. Do the same for commands with  leading variable overrides;
then git completions for "a=b git " will think the commandline is
"git ".
2022-01-27 03:51:32 +01:00
David Adam
640feeee67 CHANGELOG: work on 3.4.0 2022-01-23 22:45:09 +08:00
Aaron Gyes
9c1723863d
Update CHANGELOG.rst 2022-01-21 14:28:49 -08:00
Fabian Homborg
02241d19be CHANGELOG More ignores 2022-01-20 17:15:34 +01:00
Fabian Homborg
f612ade5d9 CHANGELOG for 3.4.0 2022-01-18 18:09:29 +01:00
David Adam
a22779e807 CHANGELOG: work on 3.4.0 2022-01-18 23:34:50 +08:00
Fabian Homborg
698b818935 Shorten default title
This now skips the "fish" bit and uses prompt_pwd to print a shorter title.

See #8641.
2022-01-16 11:17:31 +01:00
Fabian Homborg
ca12ce2494 CHANGELOG 2022-01-15 12:22:11 +01:00
Fabian Homborg
58cf5f249a Document font changes 2022-01-13 16:25:45 +01:00
David Adam
50dc826d7d CHANGELOG: work on 3.4.0 2022-01-09 08:44:01 +08:00
David Adam
ec4eccce34 CHANGELOG: work on 3.4.0 2022-01-07 00:09:02 +08:00
David Adam
a7b4fc3845 CHANGELOG: work on 3.4.0 2022-01-05 00:24:41 +08:00
David Adam
bd7edbcf50 Revert "Work on CHANGELOG for 3.4 (#8601)"
This reverts commit 935ec39668.

8403 was already in the ignore list and subcommands are not usually
included in the new completion list.
2022-01-04 22:35:43 +08:00
Ilan Cosman
935ec39668
Work on CHANGELOG for 3.4 (#8601) 2022-01-03 18:58:56 +01:00
David Adam
17b5647474 CHANGELOG: work on 3.4.0 2022-01-03 23:43:14 +08:00
David Adam
76a336d647 CHANGELOG: work on 3.4.0 2021-12-29 18:53:38 +08:00
David Adam
a9f6a38e37 CHANGELOG: work on 3.4.0 2021-12-28 14:03:11 +08:00
David Adam
3bb7f51691 CHANGELOG: work on 3.4.0 2021-12-28 12:57:34 +08:00
Nils K
1877253f47
Pass all of $argv to pk-command-not-found (#8591)
Fixes #8579.
2021-12-28 12:56:31 +08:00
Johannes Altmanninger
a078a56492 CHANGELOG: don't mention completions/man fix for BSD mandoc
This is just a fix to an existing completion entry, we usually don't
mention those.
2021-12-19 15:15:46 +01:00
David Adam
4389658e7b CHANGELOG: work on 3.4.0 2021-12-15 22:58:53 +08:00
Johannes Altmanninger
1d1bee3ba2 CHANGELOG: some updates for 3.4.0
I used the command from #8092 to list issues/PRs with missing changelog
entries, and went through most of them and added them to the changelog
(or the "ignore" list).

This commit message lists the processed issues in a consistent format,
and lists the action/reason. For each issue/PR there are twolines:
- Issue/PR number + subject
  - (I used bare issue numbers to avoid cross-referencing on github).
- verdict
  - "added new entry" means that we add a changelog line
  - "added to existing entry" means that we added the issue link to an existing
     changelog line. Usually we don't add multiple issue links, but sometimes
     there are multiple interesting issues.
  - if the verdict ends with ", ignoring", we added it to the "ignore" list in
    the changelog.

The issues are grouped by verdict, with the interesting/leftover ones
on top.

The "gh" script is already a quantum leap but we should still find
better ways to share the burden of writing the changelog.
I noticed that there are many minor updates that can probably be
ignored.  Filtering them out doesn't take much time but it adds up,
especially if it's a single person doing it.

Here's the adapted script I used:

	for issue in (gh issue list --state closed --milestone "fish 3.4.0" -L 500 | sort -n | cut -f 1)
	    egrep --quiet '\W'$issue CHANGELOG.rst; or echo https://github.com/fish-shell/fish-shell/issues/$issue
	end
	for pr in (gh pr list --state all --search "milestone:\"fish 3.4.0\"" -L 500 | sort -n | cut -f 1)
	    egrep --quiet '\W'$pr CHANGELOG.rst; or echo https://github.com/fish-shell/fish-shell/pull/$pr
	end

---

Issue 8153: Work around `setpgid` error on older Apple platforms
workaround for old OSs for which we've since dropped support, ignoring

Issue 8511: math: (n n): incorrect error
improved error output, which is very nice but too minor, ignoring

Issue 8205: Fish autocomplete error on iOS procursus
niche fix, ignoring

Issue 8271: Fix `fish_key_reader` wrapper check
minor update to not create a harmless alias for fish_key_reader, ignoring

Issue 8289: funced dosn't like backslash escapes in function names
minor escaping fix, ignoring

Issue 8310: Hide whatis database building from the user
not something many users would notice in the first place, ignoring

Issue 8368: Duplicated "Type 'help argparse' for related documentation" for argparse
minor update to error message, ignoring

Issue 8444: Variable highlight color does not span lines
very obscure fix, ignoring

Issue 8195: Errors when trying to autocomplete (invalid) UTF-8 escapes
niche fix, ignoring

Issue 8308: assertion normal_exited() failed related to paged builtin help
niche fix, ignoring

Issue 8358: sigsegv on set --show variable (when LANG is set to fr_FR.utf8)
niche(?) fix, ignoring

Issue 8170: Builtin math ncr can be extremely slow
performance improvement only when the input is NaN, ignoring

Issue 8204: Always use LC_NUMERIC=C internally
performance improvement for math, ignoring

---

Issue 8295: Add --function to `read`
added to existing entry (565)

Issue 8283: Added completions for ethtool
added to existing entry

Issue 8315: Add dart completion
added to existing entry

Issue 8330: Add common lisp completions(sbcl/roswell)
added to existing entry

Issue 8354: Fix st issue with shift+tab
added to existing entry (8352)

Issue 8391: Support vi-mode cursors in Foot Terminal 
added to existing entry (8167)

Issue 8405: Completions pager should redraw if the subbed completion wraps/unwraps the line
added to existing entry (8509)

---

Issue 8530: Speed up, fix fish_status_to_signal 8530
added new entry

Issue 8547: command -v nonexistent should exit 127
added new entry

Issue 8431: Abbr -q return status inconsistent
added new entry

Issue 8428: Binding escape as user binding breaks escape sequence bindings (arrows, etc)
added new entry

Issue 8483: Windows "color" command completion
added new entry

Issue 8087: Doesn't build when using netbsd curses on Linux
added new entry

Issue 8152: Don't override linker
added new entry

Issue 8156: Add completions for `git-sizer`
added new entry

Issue 8163: `d3ceba107e88b6c6e1a0358ebcb30366aeef653f` causes issues with repainting multi-line prompt
added new entry

Issue 8175: Completion sometimes missing the last token
added new entry

Issue 8179: `set -S` should mark read-only variables
added new entry

Issue 8209: Slow interaction between backgrounding, universal variables, and repainting
added new entry

Issue 8274: Unsetting `$fish_emoji_width` doesn't clear the cached width
added new entry

Issue 8298: If prompt ends in an empty line, the commandline is inserted at the width of the line before
added new entry

Issue 8309: colors don't kick in for ls on macOS Big Sur, Monterey (and maybe FreeBSD)
added new entry

Issue 8337: Adds sub-command clear-session to history command. Issue 5791
added new entry (as 5791)

Issue 8352: Fix delete-key in st
added new entry

Issue 8373: Add clasp completion
added new entry

Issue 8434: argparse completions
added new entry

Issue 8510: fish_key_reader ^C warning isn't right
added new entry

Issue 8519: Use `--almost-all` in `la` function
added new entry

---

Issue 1363: improve the experience of using fish over mosh
listed as 8376, ignoring

Issue 8305: incomplete man page completions
listed as 8309, ignoring

Issue 8059: Support "$(cmd)" command substitution without line splitting
listed as 159, ignoring

Issue 8127: fish_config: Read colorschemes from .theme files
listed as 8132, ignoring

Issue 8130: funced: edit the whole file, not just the function definition
listed as 391, ignoring

Issue 8270: builtin cd: print error about broken symlink
listed as 8264, ignoring

Issue 8306: fix man completion for BSD's mandoc
listed as 8305, ignoring

Issue 8441: Don't escape tildes that come from custom completions
listed as 8441, ignoring

---

Issue 8429: `cargo run --example` completions break with nested example directories
update to existing completions, ignoring

Issue 8446: Use `cargo run --example` to get list of examples
update to existing completions, ignoring

Issue 8338: Display local branches before unique remote branches in git completion
update to existing completions, ignoring

Issue 8118: Node completion: add v8 sparkplug option
update to existing completions, ignoring

Issue 8183: Add zypper subcommands completion
update to existing completions, ignoring

Issue 8184: completion nmap: suppress warning when local scripts folder exists
update to existing completions, ignoring

Issue 8191: add missing `git commit` completions
update to existing completions, ignoring

Issue 8192: Updated ping completions
update to existing completions, ignoring

Issue 8202: Add `--function` to `set` completion
update to existing completions, ignoring

Issue 8219: completion: support `--no` prefixes for mpv flag options
update to existing completions, ignoring

Issue 8241: complete "mpc load"
update to existing completions, ignoring

Issue 8243: Add and fix completions for new options
update to existing completions, ignoring

Issue 8249: Fix completions/ls.fish
update to existing completions, ignoring

Issue 8256: Fix completions/coredumpctl.fish and add new complete
update to existing completions, ignoring

Issue 8311: completions/git: Handle "1 .T" & "1 AT" files
update to existing completions, ignoring

Issue 8323: completions/xbps-query: add missing `-p` completions
update to existing completions, ignoring

Issue 8326: Update ldapsearch.fish
update to existing completions, ignoring

Issue 8327: small fix completions/duply.fish
update to existing completions, ignoring

Issue 8334: Update ip.fish
update to existing completions, ignoring

Issue 8344: Fix ant completion
update to existing completions, ignoring

Issue 8365: Update dmesg completions
update to existing completions, ignoring

Issue 8367: No hints for -g|--global and -U|--universal flags for abbr command
update to existing completions, ignoring

Issue 8381: Updated systemd-analyze completions
update to existing completions, ignoring

Issue 8406: vmctl completion function call needs to be quoted
update to existing completions, ignoring

Issue 8480: pabcnetcclear command completion update
update to existing completions, ignoring

---

Issue 8495: Stop linking to StackOverflow
doc update, ignoring

Issue 8176: document `--no-config`
doc update, ignoring

Issue 8260: Theme demo needs to be adjusted so that only unmatched quote is an error
doc update, ignoring

Issue 8380: no error about wrong >>? redirection operator
doc update, ignoring

Issue 8385: set -l works outside of command block
doc update, ignoring

Issue 8409: Some enhancements to "for" and "while" loop pages
doc update, ignoring

Issue 8439: Html docs: Remove link underlines again?
doc update, ignoring

Issue 8457: Old-style options support "=" assignment operator in complete builtin
doc update, ignoring

Issue 8522: Document prompt_hostname
doc update, ignoring

---

Issue 8221: edit_command_buffer: use "command" to ignore any functions with the same name
only helps broken systems, ignoring

Issue 8287: Prepend command to cat
only helps broken systems, ignoring

Issue 8299: Make less version check compatible with older Fish
only helps broken systems, ignoring

Issue 8487: fish_config doesn't work without curses module
only helps broken systems, ignoring

---

Issue 8128: fix 'socket file name too long' error
test fix with long tempdirs (macOS), not really user-visible, ignoring

Issue 8449: Give tests a more generic name
not user-visible, ignoring

Issue 8353: string tests sometimes failing on macOS (Github Actions)
not user-visible, ignoring

Issue 6477: history merge test fails on OpenBSD
not user-visible, ignoring

---

Issue 8471: Obtain Deno completions from itself
update to an unreleased feature (7138), ignoring

Issue 8253: `string length --visible` performance
update to an unreleased feature, ignoring

Issue 8277: Backspace character is ignored when calculating string widths
update to an unreleased feature, ignoring

Issue 8314: `fish_config choose` leaves previous right prompt in place
update to an unreleased feature, ignoring

Issue 8394: parenthesis characters outer of $(command substitution) in string cause error
update to an unreleased feature, ignoring

Issue 8500: Parser bug with command substitutions in strings inside parenthesis
update to an unreleased feature, ignoring

Issue 8419: fish_config: silently doesn't set color schemes.
regression, not in any release, ignoring

Issue 8438: :program: in sphinx doesn't link
regression, not in any release, ignoring

Issue 8478: __fish_seen_argument.fish throws exception when autocompleting
regression, not in any release, ignoring

---

Issue 8280: Fix typo in abbr docs
typofix, ignoring

Issue 8321: Fix typo in `set_colors` command documentation
typofix, ignoring

Issue 8257: Typo funcions -> functions
typofix, ignoring

---

Issue 8206: remove make_pair
no behavior change, ignoring

Issue 8222: replace push_back with emplate_back
no behavior change, ignoring

Issue 8224: clang-tidy: remove pointless virtual
no behavior change, ignoring

Issue 8227: change value to rvalue reference
no behavior change, ignoring

Issue 8228: convert const ref to rvalue ref
no behavior change, ignoring

Issue 8229: clang-tidy: use for range loops
no behavior change, ignoring

Issue 8230: fix deleted constructors
nno behavior change, ignoring

Issue 8231: clang-tidy: const reference conversions
no behavior change, ignoring

Issue 8235: clang-tidy: simplify two bool returns
no behavior change, ignoring

Issue 8237: clang-tidy: replace size comparisons with empty
no behavior change, ignoring

Issue 8239: clang-tidy: replace NULL with nullptr
no behavior change, ignoring

Issue 8252: add constexpr
no behavior change, ignoring

Issue 8430: __fish_seen_subcommand_from and __fish_seen_argument update
no behavior change (apart from a regression that's fixed), ignoring

Issue 8476: Run fish_indent on all non-test .fish files
no behavior change, ignoring

Issue 8477: Use test command instead of bracket command
no behavior change, ignoring

Issue 8521: Fix code scanning alert - Wrong type of arguments to formatting function
no behavior change, ignoring

Issue 8236: clang-tidy: replace push_back with emplace_back
no behavior change, ignoring

---
2021-12-15 22:18:16 +08:00
Johannes Altmanninger
f88e8260ca CHANGELOG: commandline -> command line
"commandline" is usually the term we  use in source code, and it's
also a builtin but user visible text should be English.
2021-12-15 22:18:16 +08:00
Johannes Altmanninger
fbb21a36f5 CHANGELOG: simplify example 2021-12-12 18:13:20 +01:00
Johannes Altmanninger
bb26e25b9d CHANGELOG: fix typo 2021-12-12 14:07:28 +01:00
Andrey Mishchenko
3b7994df52 Add completions for nodeenv v1.6.0 2021-12-11 10:25:07 +01:00
Andrey Mishchenko
bc25b566a0 Add CHANGELOG entry noting special input functions no longer available as fish functions 2021-12-11 10:19:18 +01:00
Andrey Mishchenko
bb0376887f Fix underline width 2021-12-11 10:19:18 +01:00
Andrey Mishchenko
98d443083d Fix word usage complimenting -> complementing 2021-12-11 10:19:18 +01:00
Aaron Gyes
f33df5a533
CHANGELOG.rst: a/an 2021-12-08 23:28:10 -08:00
David Adam
172b7a3995 CHANGELOG: work on 3.4.0
Includes list of issues that can be omitted for now.
2021-12-09 13:47:44 +08:00
thibault
ceade1629d builtin commandline: add option to determine if pager is fully disclosed
Use the remaining_to_disclose count to determine if all completions
are shown (allows consistent behavior between short and long completion
lists).

Closes #8485
2021-12-04 22:43:39 +01:00
Johannes Altmanninger
594c23181f Changelog for completion pager fix on multiline command (#8509) 2021-12-04 16:52:13 +01:00
Aaron Gyes
6fd988a355
Update CHANGELOG.rst
. . .
2021-12-01 02:09:28 -08:00
David Adam
d987ab8ec4 CHANGELOG: work on 3.4.0 2021-11-30 23:06:26 +08:00
Collin Styles
4a3e55f69c Don't escape tildes that come from custom completions
A completion entry like «complete -a '\\~'» results in completions
that insert \~ into the command line.  However we usually want to
insert ~, but there is no way to do that.

There are a couple of longstanding issues about completion escaping
[1].  Until we fix those in a general way, fix the common case by
never escaping tildes when applying custom completions to the command
line. This is a hack but will probably work out fine because we don't
expect literal tildes in arguments.

The tilde is included in completions for cdh, or
__fish_complete_suffix, which simply forwards results from "complete
-C". Revert a workaround to cdh that expanded ~, because we can now
render that without escaping.

Closes #4570, #8441

[ja: tweak patch and commit message]

[1]: https://github.com/fish-shell/fish-shell/pull/8441#discussion_r748803338
2021-11-27 17:05:46 +01:00
Johannes Altmanninger
ef3ded1091 Changelog expanding command tokens for custom completion #8442
Not strictly an interactive feature but fits better here?
2021-11-27 17:05:46 +01:00
Fabian Homborg
47e45704b1
Allow set --query to check for pathvarness (#8494)
Currently,

    set -q --unpath PATH

simply ignores the "--unpath" bit (and same for "--path").

This changes it, so just like exportedness you can check pathness.
2021-11-26 18:29:10 +01:00
Fabian Homborg
294ed27590 Changelog 2021-11-22 17:23:32 +01:00
Johannes Altmanninger
084458bc47 Minor changelog updates 2021-11-21 12:03:12 +01:00
Johannes Altmanninger
64dddfc6ce Only expand abbreviations if cursor is directly at command token
On a commandline like "ls arg" (cursor at end) we do not expand
abbrevations on enter.  OTOH, on "ls " we do expand. This can be
frustrating because it means that the two obvious ways to suppress
abbrevation expansion (C-Space or post-expansion C-Z) cannot be used to
suppress expansion of a command without arguments.  (One workaround is
"ls #".)

Only expand-on-execute if the cursor is at the command name (no space
in between).

This is a strict improvement for realistic scenarios, because if there
is a space, the user has already expressed the intent to not expand
the abbreviation. (I hope no one is using recursive abbreviations.)

Closes #8423
2021-11-14 11:52:10 +01:00
Fabian Homborg
94555ad26b CHANGELOG: Reorder
- More Notable
- Put ``_`` change into deprecation
- Things that can happen in scripts are scripting improvements, not
- interactive (funced is an interactive thing)
- Fix the variable name to turn off autosuggestions - it's $fish_autosuggestion_enabled.
2021-11-12 17:19:38 +01:00
Aaron Gyes
ac1df310c8 Long march towards more structured text 2021-11-12 04:22:35 -08:00
Fabian Homborg
4cad079aeb Le Changuelogue 2021-11-08 22:56:42 +01:00
Fabian Homborg
e163990788 CHANGELOG new completions 2021-11-08 17:22:02 +01:00
ridiculousfish
25f47729e7 math: Correct printing of negative and large values in octal and hex
This fixes printing octal and hex values that are negative or larger
than UINT_MAX.

Negative values get a leading -, like:

    > math --base hex -10
    -0xa

Fixes #8417.
2021-11-07 16:43:30 -08:00
Fabian Homborg
3abe21708d CHANGELOG 8376 2021-11-02 22:13:31 +01:00
Kevin F. Konrad
788692f1e5
add istioctl completions (#8343)
This program uses the Cobra framework for argument parsing and completion generation.
Just source the completions supplied by upstream.
This works around "go install" not being able to install completions files (only binaries).
2021-10-31 13:10:11 +01:00
Fabian Homborg
c3e8f5bc02 CHANGELOG 2021-10-28 16:32:58 +02:00
Fabian Homborg
75d252dadc
CHANGELOG: Move code block where it belongs 2021-10-28 09:10:12 +02:00
Fabian Homborg
c7475202ae Move wslpath changelog entry to 3.4 2021-10-22 23:39:12 +02:00
take
3ae1842fbe
Add clasp completion (#8373)
* Add clasp completion

* Update CHANGELOG.rst
2021-10-22 23:23:22 +02:00
百地 希留耶
be9b8829d0
Add completions for wslpath (#8364)
* add completions for `wslpath`

* add changelog entry for `wslpath` completion
2021-10-22 23:22:02 +02:00
Fabian Homborg
21ddffb9e0 CHANGELOG 8292 2021-10-19 17:35:32 +02:00
Fabian Homborg
7ecb0b78e9 Tix fypo 2021-10-14 17:02:50 +02:00
Aaron Gyes
172601299f builtin _ is now a reserved keyword
Similar to `test`, `_` is so likely to at least slow down if not
break all things catastrophically that it ought not be allowed as a
function name. Fixes #8342
2021-10-11 00:27:44 -07:00
Fabian Homborg
8784253282 Ye olde changelogge 2021-10-07 20:46:59 +02:00
takeokunn
4a3b954a48 Update CHANGELOG 2021-10-06 14:51:26 -07:00
ridiculousfish
83799228fe Relnote ending support for Mac OS 10.9
Mac OS 10.9 does not have the fstatat function which fish started
calling in commit 71a0d839a7. Let's end support for 10.9, which was
released in 2013.
2021-10-06 14:37:26 -07:00
Jony
7df5efe317 completions/xbps-query: add missing -p completions 2021-09-30 12:13:42 -07:00
takeokunn
d2ca6ed564 Add dart completion 2021-09-25 10:36:11 -07:00
Lia Lenckowski
1d7036d19f Add completions for cpupower 2021-09-20 17:46:15 +02:00
ridiculousfish
05fdee1be7 Continue passing -X / --no-init for less < v530
The less -F / --quit-if-one-screen option is buggy before v530. To work
around this, pass --no-init less versions older than 530.

The --no-init option was previously passed; it was removed in d15a51897d
for mouse support. Unfortunately it looks like we can't have mouse
support and --quit-if-one-screen on macOS shipped less (version 487).

It's worth fixing this because otherwise history and help is just not
printed on stock macOS.

Relevant is https://unix.stackexchange.com/questions/107315/less-quit-if-one-screen-without-no-init

Fixes #8157.
2021-09-16 18:03:03 -07:00
Johannes Altmanninger
7f71df0905 builtin cd: recognize EPERM, as it's returned by MacOS
Now that we removed EROTTEN which had the same error code as EPERM,
we can give a less confusing error in case a user has not allowed
their terminal access to a directory.

See #8264
2021-09-17 00:43:12 +02:00
Johannes Altmanninger
eae9ee7f35 builtin cd: print error about broken symlinks
When cd is passed a broken symlink, this changes the error message from
"no such directory" to "broken symbolic link".  This scenario probably
won't happen very often since completion won't suggest broken symlinks
but it can't hurt to give a good error.

Fish used to do this until 7ac5932.  This logic used to be in
path_get_cdpath, however, that is only used for highlighting, so we
don't need error messages there. Changing cd is enough.

Reword from "rotten" to "broken" since that's what file(1) uses.
Clean-up leftovers from old "rotten" code (nomen est omen).

See #8264
2021-09-17 00:43:12 +02:00
ridiculousfish
29413665c5 Treat Fitzpatrick emoji modifiers as width 0
Fixes #8275
2021-09-09 18:06:59 -07:00
Fabian Homborg
40b40a4316 changuelogue 2021-09-09 18:42:31 +02:00
Fabian Homborg
1c64e27a59 CHANGELOG
The command substitution thing is a *bugfix*, not a deprecation.
2021-08-30 19:48:38 +02:00
Fabian Homborg
8334df9368 CHANGELOG: Work on 3.4.0 2021-08-29 20:19:18 +02:00
mtoohey31
25b9568f2a completion: exif (#8246)
Adds completion support for the exif command line tool (upstream:
https://github.com/libexif/exif).
2021-08-29 11:35:08 +02:00
David Adam
dffc84712a CHANGELOG: work on 3.4.0 2021-08-18 22:23:32 +08:00
ridiculousfish
2ca66cff53 Disable job control inside command substitutions
This disables job control inside command substitutions. Prior to this
change, a cmdsub might get its own process group. This caused it to fail
to cancel loops properly. For example:

    while true ; echo (sleep 5) ; end

could not be control-C cancelled, because the signal would go to sleep,
and so the loop would continue on. The simplest way to fix this is to
match other shells and not use job control in cmdsubs.

Related is #1362
2021-08-18 22:20:03 +08:00
Fabian Homborg
7df833acc1 MOAR CHANGELOG 2021-08-17 16:31:22 +02:00
Fabian Homborg
102853e0e0 Work on the CHANGELOG
Adding some examples seems helpful, there's no need to be super terse.
2021-08-17 13:52:12 +02:00
David Adam
ef53605fa9 CHANGELOG: work on 3.4.0 2021-08-16 22:01:33 +08:00
David Adam
8dd4c67db1 funcsave: edit the whole file containing a function
Many functions ship in files with helper functions, and it is useful to
edit those too.

Closes #391.
2021-08-16 21:45:22 +08:00
Fabian Homborg
e2fef7b392 CHANGELOG 2021-08-14 11:30:30 +02:00
Fabian Homborg
8767f873eb CHANGELOG set -q change 2021-08-14 10:59:49 +02:00
ridiculousfish
b0b6a585a8 Support Apple_Terminal in fish_vi_cursor
This enables it unconditionally, as tests show that the cursor escapes
are ignored before 10.12.

Fixes #8167
2021-08-10 13:23:08 -07:00
Johannes Altmanninger
b56b8bb395 Minor changelog tweaks 2021-08-10 21:01:39 +02:00
Fabian Homborg
da32b6c172 CHANGELOG prompt_pwd 2021-08-09 17:57:27 +02:00
Fabian Homborg
5e46ad645a CHANGELOG string width stuff 2021-08-04 21:12:42 +02:00
Fabian Homborg
b97a75ff83 CHANGELOG set --function 2021-08-01 20:10:07 +02:00
Johannes Altmanninger
66709571ed fish_indent: handle tokens with trailing escaped newlines
Fixes #8197
2021-08-01 18:59:45 +02:00
Kevin Konrad
577a273228 add changelog entry for qmk completion 2021-07-28 18:10:59 +02:00
Fabian Homborg
a6fa1c3b10 CHANGELOG 2021-07-27 18:39:37 +02:00
Johannes Altmanninger
cc32b4f2a7 Make '&' only background if followed by a separating character
This is opt-in through a new feature flag "ampersand-nobg-in-token".

When this flag and "qmark-noglob" are enabled, this command no longer
needs quoting:

	curl https://example.com/thing?foo=bar&duran=duran

Compared to the previous approach e1570a4 ("Let '&' only separate as
the first char of a word"), this has some advantages:

1. "&&" and "&>" are no longer affected. They are still special, even
   if used between tokens without spaces, like "echo bar&>foo".
   Maybe this is not really *better*, but it avoids risking to annoy
   users by breaking the old variant.

2. "&" is still special if at the end of a token, like in "sleep 1&".

Word movement is not affected by the semantics change, so Alt-F and
friends still stop at every "&".
2021-07-23 22:58:51 +02:00
Fabian Homborg
0f127cc7f3 Ye olde logge of changes 2021-07-21 22:34:52 +02:00
Kevin F. Konrad
869c42d72a
Add completion for azure cli (az) (#8141)
* add completion for azure cli (az)

* alter az.fish to match faho's requests

Co-authored-by: Kevin Konrad <kevin.konrad@unicepta.com>
2021-07-21 17:57:59 +02:00
Fabian Homborg
58997cae2f CHANGELOG Some rewording and reordering
$() is definitely Notable.
2021-07-20 21:04:43 +02:00
Fabian Homborg
b0981ef6db Should auld changelogges be forgotten? 2021-07-16 20:29:09 +02:00
Fabian Homborg
6dd010a0e1 I'm going through changeeeeeeesss 2021-07-14 18:57:38 +02:00
Fabian Homborg
13c5381c07 CHANGELOGGE 2021-07-14 16:39:07 +02:00
Johannes Altmanninger
5999d660c0 Docs for "$(cmd)" and $(cmd) 2021-07-13 21:33:42 +02:00
Johannes Altmanninger
fab06020af Changelog flossing 2021-07-12 23:42:01 +02:00
ridiculousfish
179073ce62 Clear the control-C cancel flag earlier, allowing event handlers to run
When the user presses control-C, fish marks a cancellation signal which
prevents fish script from running, allowing it to properly unwind.
Prior to this commit, the signal was cleared in the reader. However this
missed the case where a binding would set $fish_bind_mode which would
trigger event handlers: the event handlers would be skipped because of
the cancellation flag was still set. This is similar to #6937.

Let's clear the flag earlier, as soon as we it's set, in inputter_t.
Fixes #8125.
2021-07-11 18:04:44 -07:00
David Adam
db25662541 CHANGELOG: work on 3.4.0 2021-07-11 21:02:45 +08:00
radiantly
55e60eeae2 Add completions for black (#8123) 2021-07-11 14:35:39 +02:00
David Adam
44463f459f CHANGELOG: work on 3.4.0 2021-07-10 20:41:33 +08:00
David Adam
be74c281b6 Merge branch 'Integration_3.3.1' 2021-07-06 23:50:59 +08:00
David Adam
b2f791b577 Release 3.3.1
Closes #8107.
2021-07-06 22:45:37 +08:00
David Adam
61a637bcc5 CHANGELOG: work on 3.3.1 2021-07-06 22:20:41 +08:00
David Adam
86a736df57 Revert "CHANGELOG: add scaffolding for 3.4.0"
This reverts commit 251fbc7260.

The patch release will not include these major changes.
2021-07-06 22:19:22 +08:00
David Adam
22e6b3db16 Revert "CMake: bump minimum requirement to 3.5"
This reverts commit 210dda2c4c.

The patch release should not change the build requirements.
2021-07-06 22:18:48 +08:00
David Adam
210dda2c4c CMake: bump minimum requirement to 3.5
CMake 3.5.0 was released in March 2016.
2021-06-28 23:56:02 +08:00
David Adam
251fbc7260 CHANGELOG: add scaffolding for 3.4.0 2021-06-28 23:55:06 +08:00
David Adam
d0593b9b2b Release 3.3.0
Closes #8012.
2021-06-28 22:46:46 +08:00
David Adam
0e960b77d3 CHANGELOG: minor grammar rewording 2021-06-28 22:34:35 +08:00
David Adam
aae3a78934 CHANGELOG: final work on 3.3.0 2021-06-24 22:21:30 +08:00
Johannes Altmanninger
48c1550f61 Point to builtins begin/end when a failed command starts with "{"
Closes #6415
2021-06-23 21:47:40 +02:00
Johannes Altmanninger
7c2dd694e0 Provide functions to toggle commandline prefix/suffix
This introduces two functions to
- toggle a process prefix, used for adding "sudo"
- add a job suffix, used for adding "&| less"

Not sure if they are very useful; we'll see.

Closes #7905
2021-06-23 20:51:20 +02:00
David Adam
ece88ca2d2 CHANGELOG: penultimate work on 3.3.0 2021-06-22 17:19:33 +08:00
ridiculousfish
ba2e7db7e8 Notice when exit has been run from within fish_prompt
This allows `exit` to tell the reader to stop, when run inside
fish_prompt. Fixes #8033.
2021-06-12 10:20:49 -07:00