Commit Graph

225 Commits

Author SHA1 Message Date
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
Karolina Gontarek
da2f7999ad
Fix backward-kill-path-component erasing extra tokens (#7872)
Fixes #6258
2021-03-29 22:58:50 +02:00
Fabian Homborg
70813eb878 Update CHANGELOG 2021-03-29 18:00:38 +02:00
Hirokazu Hata
f1c93a99f9 changelog: fix missiong inline literal end-string
When building the document with Sphinx, the following warning is displayed, so add end-string.
"../CHANGELOG.rst:29: WARNING: Inline literal start-string without end-string."
2021-03-29 17:05:23 +02:00
Ilan Cosman
c762c62464 Add max and min math functions 2021-03-28 13:22:44 -07:00
ridiculousfish
a5ea8570ae Properly syntax highlight commands that get entered too fast
This fixes the following problem: if a command is entered while the
previous command is still executing, fish will see it all at once and
execute it before syntax highlighting as a chance to start. So the
command will appear wrong on the terminal. Fix this by detecting this
case and performing a fast no-io highlight.

An example of how to reproduce this:
run `sleep 3` and then type `echo foo` while the sleep is still running.
2021-03-28 12:52:59 -07:00
ridiculousfish
b44f40547b Rationalize exit codes for failed execs
This cleans up some exit code processing. Previously a failed exec
would produce exit code 125 unconditionally, while a failed posix_spawn
would produce exit code 1 (!).

With this change, fish reports exit code 126 for not-executable, and 127
for file-not-found. This matches bash.
2021-03-27 21:37:46 -07:00
ridiculousfish
eb71e4555f Clean up and relnote shebangless script support
This adds a test for shebangless support from #7802, cleans up some of
its tricks, and includes it in the changelog.
2021-03-27 16:08:42 -07:00
Fabian Homborg
b9a68e9e86 Update CHANGELOG 2021-03-26 19:32:14 +01:00
Michael Jarvis
cd1f0cc5d5 Add a placeholder to last section of CHANGELOG.rst
This placeholder silences a warning, and allows the horizontal
line between releases to be retained.
2021-03-25 07:34:20 +08:00
Michael Jarvis
620344b076 Fix Sphinx warning
When regenerating documentation with Sphinx, there's a warning issued about CHANGELOG.rst:

```
../CHANGELOG.rst:33: WARNING: Document or section may not begin with a transition.
```

This is almost identical to the fix in commit 84a89f5195.
2021-03-25 07:34:20 +08:00
Ilan Cosman
bcbfd70d41
Create empty directories and files on interactive startup (#7796)
Closes #7402
2021-03-23 21:01:00 +01:00
ridiculousfish
66a873ad23 Relnote fix for 7837 2021-03-21 16:59:22 -07:00
Karolina Gontarek
e4eaca1032
Fix wrapping for cd (#7843) 2021-03-21 09:27:19 +01:00
Johannes Altmanninger
7fea321b3e
Use the correct case in completion pager (#7744)
Consider

	$ complete -c foo -a 'aab aaB' -f
	$ foo A<TAB>

since 28d67c8 we would insert the common prefix AND show the pager.
Due to case-insensitive comparison, "b/B" was considered to be part
of the prefix. Since the prefix is added to each pager item [1]
we get wrong results. Fix this by removing the insensitive comparison
between completions - I don't think it was of much use anyway.
Commandline tokens are still matched case-insensitively, this is
just about completions.

Test this by running interactive fish inside tmux (pexpect's terminal
emulation not have enough capabilities).  Also add tests for recent
interactive regressions #7526 and #7738.

Closes #3978

[1]: b38a23a would solve this differently by giving every pager item
its own prefix, but was reverted since it needs more fixes.
2021-03-21 09:25:29 +01:00
David Adam
c2eef7c250 CHANGELOG: add separator (minor formatting fix) 2021-03-18 12:36:48 +08:00
David Adam
23f613723f Merge branch 'Integration_3.2.1' 2021-03-18 12:23:06 +08:00
David Adam
156d57d270 Release 3.2.1
Closes #7772.
2021-03-18 11:05:28 +08:00
David Adam
a1653c928e CHANGELOG: work on 3.2.1 2021-03-17 21:51:02 +08:00
ridiculousfish
9ab77c7ddc Relnote fix for #7770 2021-03-10 22:50:57 -08:00
ridiculousfish
7e8b8345e7 Fix some graphical glitches in fish_config
fish_config has some shadows and other elements which don't align
propertly. Fix these, and apply some other miscellaneous polish.

Fixes #7811
2021-03-10 18:46:06 -08:00
Fabian Homborg
f204fd147d CHANGELOG Updates 2021-03-10 07:30:27 +01:00