Commit Graph

346 Commits

Author SHA1 Message Date
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
Fabian Homborg
f073bf59a8 CHANGELOG for 3.3 2021-06-10 16:49:28 +02:00
Fabian Homborg
7059eaa4ab Revert "Disallow escaped characters in variable expansion"
This reverts commit 555af37616.
2021-06-10 16:46:17 +02:00
David Adam
f90577ddf6 CHANGELOG: work on 3.3.0 2021-06-06 23:24:31 +08:00
Fabian Homborg
775c5f01b4 CHANGELOG locale coercion 2021-06-06 09:31:40 +02:00
Fabian Homborg
48acd316c8 CHANGELOG
Document the last few changes and move some of the things out of
"Interactive" into more specific categories. If it's to do with
completions, it goes into completions. Bindings? How about "Bindings"?
2021-06-05 11:32:22 +02:00
Fabian Homborg
46208ff276 CHANGELOG 2021-06-03 10:07:54 +02:00
David Adam
8e51123574 CHANGELOG: work on 3.3.0 2021-06-02 22:37:48 +08:00
Scott Bonds
3ddb5a2bdc
Add color to ls output on OpenBSD when colorls is installed (#8035)
* add support for colorized ls on openbsd

* add changelog line for colorls support

* add readme line for colorls support

* determine ls command at runtime, don't cache it

* eliminate __fish_ls_command function
2021-06-01 19:46:13 +02:00
David Adam
83a11dda3f CHANGELOG: work on 3.3.0 2021-06-01 23:00:47 +08:00
ridiculousfish
08950b1077 Revert "Bravely set job control to full at startup"
Now that `$last_pid` is never fish's pid, we no longer need to force
jobs to run in their own pgroup. Restore the job control behavior to
what it was prior, so that signals may be delivered properly in
non-interactive mode.

This reverts commit 3255999794
2021-05-25 15:28:53 -07:00
ridiculousfish
33f3c03dae Allow on-job-exit handlers to be added for any pid in the job
Prior to this change, a function with an on-job-exit event handler must be
added with the pgid of the job. But sometimes the pgid of the job is fish
itself (if job control is disabled) and the previous commit made last_pid
an actual pid from the job, instead of its pgroup.

Switch on-job-exit to accept any pid from the job (except fish itself).
This allows it to be used directly with $last_pid, except that it now
works if job control is off. This is implemented by "resolving" the pid to
the internal job id at the point the event handler is added.

Also switch to passing the last pid of the job, rather than its pgroup.
This aligns better with $last_pid.
2021-05-25 15:28:53 -07:00
ridiculousfish
f3d78e21d1 Switch last_pid from the pgroup to the actual last pid
When a job is placed in the background, fish will set the `$last_pid`
variable. Prior to this change, `$last_pid` was set to the process group
leader of the job. However this caussed problems when the job ran in
fish's process group, because then fish itself would be the process group
leader and commands like `wait` would not work.

Switch `$last_pid` to be the actual last pid of the pipeline. This brings
it in line with the `$!` variable from zsh and bash.

This is technically a breaking change, but it is unlikely to cause
problems, because `$last_pid` was already rather broken.

Fixes #5036
Fixes #5832
Fixes #7721
2021-05-25 15:28:53 -07:00
ridiculousfish
504a969a24 Separate on-job-exit and and on-process-exit events
It is possible to run a function when a process exits via `function
--on-process-exit`, or when a job exits via `function --on-job-exits`.
Internally these were distinguished by the pid in the event: if it was
positive, then it was a process exit. If negative, it represents a pgid
and is a job exit. If zero, it fires for both jobs and processes, which is
pretty weird.

Switch to tracking these explicitly. Separate out the --on-process-exit
and --on-job-exit event types into separate types. Stop negating pgids as
well.
2021-05-19 11:29:08 -07:00
Fabian Homborg
3a0faa4dfd CHANGELOG rewording 2021-05-19 08:41:14 +02:00
Fabian Homborg
e19ccc8a7a CHANGELOG
Ye olde change logge.
2021-05-18 09:22:40 +02:00
ridiculousfish
6d00ad1045 Ensure that on-process-exit events fire for reaped jobs
This ensures that if a job exits before we have set up the
on-process-exit handler, the handler will still fire.

Fixes #7210
2021-05-17 15:28:32 -07:00
ridiculousfish
962b0f8b90 Pass $status to process-exit event handlers in all cases
Previously, an event handler would receive -1 if the process exited due
to a signal. Instead pass the same value as $status.
2021-05-17 15:25:27 -07:00
Karolina Gontarek
31f3c16857 Resolve relative paths in command names for complete -p
Fixes #6001
2021-05-16 21:52:38 +02:00
ridiculousfish
5de63c9cbb Reimplement builtin_wait using wait handles
This switches builtin_wait from waiting on jobs in the active job list, to
waiting on the wait handles. The wait handles may be either derived from
the job list itself, or from saved wait handles from jobs that exited in
the background.

Fixes #7210
2021-05-15 21:48:15 -07:00
ridiculousfish
91a4059a8f Changelog fix for #7968 2021-05-10 16:03:33 -07:00
ridiculousfish
555af37616 Disallow escaped characters in variable expansion
Prior to this fix, an escaped character like \x41 (hex for ascii A)
was interpreted the same was as A, so that $\x41 would be the same
as $A. Fix this by inserting an INTERNAL_SEPARATOR before these escapes,
so that we no longer treat it as part of the variable name.

This also affects brackets; don't treat echo $foo\1331\135 the same as
echo $foo[1].

Fixes #7969
2021-05-05 16:23:06 -07:00
Johannes Altmanninger
fa74dc977b fish_greeting: show private mode message if $fish_greeting is empty list
This was droped because of Cartesian product expansion.
Also fix the spurious dot in case the greeting is "".

Fixes #7974
2021-05-05 18:53:51 +02:00
Fabian Homborg
4fd8673772 I'm going through CHANGELOG 2021-05-01 19:15:23 +02:00
Fabian Homborg
b3926aca63 Ye olde changelogge 2021-05-01 18:54:33 +02:00
Johannes Altmanninger
9d7f6db792 fish_indent: preserve escaped newlines around variable assignments
In many cases we currently discard escaped newlines, since they
are often unnecessary (when used around &|;). Escaped newlines
are useful for structuring argument lists. Allow them for variable
assignments since they are similar.

Closes #7955
2021-04-27 00:13:48 +02:00
Fabian Homborg
4e41a2bc9f CHANGELOG Remove reverted git change
56af5d0702 reverted the bit that showed
staged state if dirty state wasn't active.
2021-04-22 16:25:00 +02:00
Fabian Homborg
281817f2c5 CHANGELOG prompt stuff 2021-04-22 16:24:38 +02:00
Karolina Gontarek
9d66ddc840 Rename variable to fish_killring 2021-04-21 16:39:29 -07:00
Karolina Gontarek
f1ece78b67 Add CHANGELOG entry 2021-04-21 16:39:29 -07:00
ridiculousfish
f4bcfd9085 Correct behavior of string match variable import with multiple arguments
This refactors the behavior of string match with capture groups to
correctly handle multiple arguments. Now the variable capture applies to
the first match, as documented. Fixes #7938.
2021-04-20 15:15:52 -07:00
Fabian Homborg
c95a223f5e Better errors when calling a command in a command substitution fails 2021-04-19 16:47:17 +02:00
ridiculousfish
e8a6d31aea Correct behavior of string match and unmatched capture groups
string match is documented as setting an unset variable if a capture group
is unmatched in an otherwise matched regex, and if the `--all` flag is not
provided. However prior to this fix, it instead set a variable containing
the empty string as a single value. Correct the implementation to match
the documentation.

Note that if the `--all` flag is provided we continue to set empty
strings, which is documented.
2021-04-18 21:04:25 -07:00
Xirui Zhao
8bbb06bf5c vi mode: bind u/C-r to undo/redo in place of history search (#7908) 2021-04-13 18:47:34 +02:00
Fabian Homborg
5750351210 Update CHANGELOG 2021-04-13 16:58:22 +02:00
David Adam
a918cabf5e feature flags: default stderr-nocaret to on 2021-04-12 22:18:48 +08:00
Fabian Homborg
3100cd1bb7 CHANGELOG 2021-04-10 17:20:27 +02:00
David Adam
783736c77f Merge branch 'Integration_3.2.2' 2021-04-07 21:09:25 +08:00
David Adam
0c2cbfc01f Release 3.2.2
Closes #7889.
2021-04-07 20:31:43 +08:00
David Adam
da0c9da880 CHANGELOG: work on 3.2.2 2021-04-06 23:32:51 +08:00
David Adam
0efa471339 CHANGELOG: remove items fixed in 3.2.2 2021-04-06 22:39:57 +08:00
David Adam
32438faf86 CHANGELOG: note #7900 2021-04-06 22:37:44 +08:00
ridiculousfish
36ad116b34 Properly report errors when builtin output fails
This correctly sets $status when a builtin succeeds but its output fails;
for example if the output is redirected to a file and that write fails.

Fixes #7857
2021-04-03 16:11:25 -07:00
David Adam
16bc170126 CHANGELOG: work on 3.3.0 2021-04-01 23:42:56 +08:00
Fabian Homborg
e56d8a8e5e Changelog new fish_mode_prompt 2021-03-31 18:06:17 +02:00
Michael Jarvis
f9e95e5f5b Fix Sphinx warning
For some reason, the space in seems to cause a problem.

```
../CHANGELOG.rst:30: WARNING: Inline literal start-string without end-string.
```
2021-03-30 18:05:37 +02:00