Commit Graph

565 Commits

Author SHA1 Message Date
EmilySeville7cfg
a065dd7764 Add completion for dolphin (#9361)
Closes #9361
2022-11-26 09:45:12 +01:00
EmilySeville7cfg
4a85091ed7 Add completion for okular (#9358)
Closes #9358
2022-11-26 09:45:12 +01:00
EmilySeville7cfg
51141b9a2f Add completion for kb (#9357)
Closes #9357
2022-11-26 09:45:12 +01:00
EmilySeville7cfg
a4c9b3a70d Add completion for eg (#9356)
Closes #9356
2022-11-26 09:45:12 +01:00
Bart Libert
00b34e28a2 completions: Add toot 2022-11-22 17:15:40 -06:00
Lia Lenckowski
c5a026c955 add completion for loadkeys 2022-11-01 18:51:17 +01:00
Lia Lenckowski
0a6efdc4ad fix lsblk column completion 2022-11-01 18:50:21 +01:00
Mahmoud Al-Qudsi
5ad0d95694 CHANGELOG: Add status current-commandline 2022-10-26 12:18:05 -05:00
Mahmoud Al-Qudsi
ee62bee9cd CHANGELOG: Document eval overflow fix
[ci skip]
2022-10-25 13:51:46 -05:00
Johannes Altmanninger
4de2891507 fish_clipboard_copy: make it work inside SSH/containers via OSC 52
When running inside SSH, Control-X runs a clipboard utility on the remote
system.  For pbcopy (and probably clip.exe too) this means that we write to the
remote system's clipboard. This is usually not what the user wants (although
it is consistent with  fish_clipboard_paste).  When X11 forwarding is used,
xclip/xsel copy to the SSH client's clipboard, which is what most users want.

When we don't have X11 forwarding, we need a different solution. Fortunately,
modern terminal emulators implement the OSC 52 escape sequence for setting
the clipboard of the terminal's system. Use it in fish_clipboard_copy.

Tested in SSH and Docker containers on foot, iTerm2, kitty, tmux and xterm
(this one requires "XTerm.vt100.allowWindowOps: true").

Should also work in GNU screen and Windows Terminal. On terminals that don't
support OSC 52 (like Gnome Terminal or Konsole), it seems to do nothing.

Since there does not seem to be a way to feature-probe OSC 52, let's just
always do both (pbcopy and friends as well as OSC 52).  In future, we should
probably stop calling pbpaste and clip.exe, at least on remote systems.

I think there is also an escape sequence to request pasting the system
clipboard but that's less important and less popular, possibly due to
security concerns.
2022-10-24 22:45:45 +02:00
Fabian Boehm
040591bc47 Actually explain what that macOS error is about
"Intermittent error has been fixed" tells me nothing.
2022-10-24 21:55:29 +02:00
Aaron Gyes
9499582a8e
Update CHANGELOG.rst 2022-10-22 13:34:12 -07:00
Fabian Boehm
061f27a0bf CHANGELOG 2022-10-21 20:24:49 +02:00
Mahmoud Al-Qudsi
f122eb666b Changelog: Mention new set -eglU support 2022-10-20 11:21:42 -05:00
Fabian Boehm
b741decb07 CHANGELOG 2022-10-19 20:14:08 +02:00
Michael Jarvis
ad696a1ec3
Fix warning 20221018 (#9287)
* Fix Sphinx warning:

../CHANGELOG.rst:2: WARNING: Explicit markup ends without a blank line; unexpected unindent.

* Fix Sphinx warning:

fish-shell/doc_src/language.rst:129: WARNING: Explicit markup ends without a blank line; unexpected unindent.
2022-10-18 18:23:12 +02:00
Bart Libert
759ca16b37
completions: Add dua (#9277) 2022-10-14 18:52:14 +02:00
Kjetil Thuen
c3052a6218
Add clojure completions (#9272)
* Add clojure completions

* More ideomatic fish code

* Clojure completions in separate file

* Aboid use of psb using bb -e

* Return early when bb can not be found

* Remove superflous escape

* Another superflous escape
2022-10-14 18:50:47 +02:00
Fabian Boehm
e6c30a0e5d CHANGELOG: Add ignores 2022-10-12 21:03:26 +02:00
Fabian Boehm
b9b0bc7fce CHANGELOG 2022-10-09 15:24:01 +02:00
Gustavo Costa
62794446b7 Add asciinema completions 2022-10-05 18:53:54 +02:00
Fabian Boehm
68fffdad0a CHANGELOG
Also add some more to the "notable improvements" section - all the new
subcommands and the error squiggly thing, because I like it.
2022-09-26 19:47:53 +02:00
Fabian Boehm
604fa867ac CHANGELOG 2022-09-22 22:50:33 +02:00
ridiculousfish
ceafb65882 Compile with large-file support (LFS)
This adds preprocessor defines for _LARGEFILE_SOURCE and
_FILE_OFFSET_BITS=64 and a few others, fixing a bug that was reported on
gitter. This prevents issues when running fish on 32 bit systems that
have filesystems with 64 bit inodes.
2022-09-20 22:51:44 -07:00
Aaron Gyes
d84443e4a8 CHANGELGO: Add a bug fix section, document bind change
I suggest promoting a few of the better fixes or better new
features to 'Notable improvements and fixes'. There's just 1 item
there.
2022-09-12 16:22:37 -07:00
Maxime Bouillot
d50e9ffff3
Add the possibility to ignore arguments in alliases (#9199)
* Replace ";" with "\n" in alias-generated functions

This can let us add a "#" in our aliases to make
them ignore additional arguments.

* Update changelog about aliases that ignore arguments

* Update test for alias.fish

This is now compliant with the aliases that can
ignore arguments.
2022-09-11 09:55:11 +02:00
ridiculousfish
5cf0778207 Claim the tty unconditionally in reader_data_t::readline
When fish runs with job control enabled, it transfers ownership of the
tty to a child process, and then reclaims the tty after the process
exits. If job control is disabled then fish does not transfer or reclaim
the tty.

It may happen that the child process creates a pgroup and then transfers
the tty to it. In that case fish will not attempt to reclaim the tty, as
fish did not transfer it. Then when fish reads from stdin it will
receive SIGTTIN instead of data.

Fix this by unconditionally claiming the tty in readline().

Fixes #9181
2022-09-09 13:43:29 -07:00
Fabian Boehm
cab7984a7c Explicitly CHANGELOG math division by zero behavior change 2022-09-09 20:07:56 +02:00
Fabian Boehm
3981137034 CHANGELOG 2022-09-09 19:03:18 +02:00
EJ
1d1a3d6e82
Add fortune completions (#9177)
* Add fortune completions

Add -r for required parameters

* add updates to changelog
2022-09-07 09:46:45 +02:00
bagohart
106e030096
added completions for sad (#9145)
* added completions for sad and added note in changelog

* ran fish_indent on completion file

* split -h and --help into two distinct completion options
2022-08-25 13:20:15 +02:00
Fabian Boehm
9492628b08 Work on the CHANGELOG
Some of the recent stuff, some examples, and put the headline feature first.
2022-08-12 18:46:53 +02:00
Fabian Boehm
754a6da060 CHANGELOG
I really hate doing these as separate commits, but I hate it more when
there's weird merge/revert conflicts when it's in the same commit.
2022-08-10 17:04:23 +02:00
Fabian Boehm
c288443b4d CHANGELOG 2022-08-09 20:34:40 +02:00
Fabian Boehm
2eae563b82 CHANGELOG 2022-08-09 20:06:22 +02:00
Fabian Boehm
d7b82618ec CHANGELOG 2022-08-09 20:01:20 +02:00
Kevin Konrad
6128b58be6 add completion for kind
Closes #9110
2022-08-09 18:58:22 +02:00
Daanturo
08a48af356 Add Firefox completions 2022-08-09 18:54:49 +02:00
Johannes Altmanninger
dcff0a2f2b Add Control+R incremental history search in pager
This reimplements ridiculousfish/control_r which is a more future-proof
approach than #6686.
Pressing Control+R shows history in our pager and allows to search filter
commands with the pager search field.

On the surface, this works just like in other shells; though there are
some differences.

- Our pager shows multiple results at a time.
- Other shells allow to use up arrow/down arrow to select adjacent entries
  in history. Shouldn't be hard to implement but the hidden state might
  confuse users and it doesn't play well with up-or-search, so this is
  left out.

Users might expect the history pager to use subsequence matching (fuzzy
matching) like the completion pager, however due to the history pager design it
uses substring matching.  We could change this in future, however that means
we would also want to change the ordering from "reverse-chronological" to
"longest common subsequence" (e.g. what fuzzy finders do), because otherwise
a query "fis" might give this ordering:

            fsck /dev/disk/by-partlabel/Linux\x20filesystem
            fish

which is probably not what the user wants.

The pager shows only a small number of history items at a time.  This is
because, as explained above, the history pager does not support subsequence
matching, so navigating it does not scale well.

Closes #602
2022-07-30 23:27:24 +02:00
ridiculousfish
2410e27d10 Add a test and CHANGELOG fix for #9096 2022-07-30 10:14:19 -07:00
Michael Forster
91c68ec1af Add fish_cursor_selection_mode documentation 2022-07-30 09:49:23 -07:00
Shun Sakai
13febcf54f
Add zig completion (#9083)
* Add `zig` completion

* Update CHANGELOG

* Update `zig` completion

* Fix `zig` completion

Change to enable filename completion on `zig cc` and `zig c++`.
2022-07-26 16:01:46 +02:00
David Adam
e93e85f3ce Merge branch 'Integration_3.5.1' 2022-07-20 22:25:41 +08:00
David Adam
62063e24ca Release 3.5.1 2022-07-20 18:15:43 +08:00
Fabian Boehm
0709b796bb CHANGELOG path mtime 2022-07-18 20:47:39 +02:00
Aaron Gyes
c312d2281b
fixup 2022-07-17 14:38:35 -07:00
Aaron Gyes
198ce73db5
Update CHANGELOG for test extensions 2022-07-17 14:18:18 -07:00
David Adam
0f84b9fafb CHANGELOG: work on 3.5.1 2022-07-16 21:55:28 +08:00
Bagohart
e7e4d8415b added tab completions for choose
(cherry picked from commit ce6b122f7f)
2022-07-16 21:41:37 +08:00
Bagohart
9cdaf1ec72 added tab completions for navi
(cherry picked from commit 824ee5d70b)
2022-07-16 21:40:30 +08:00
David Adam
e8cc3803ca CHANGELOG: work on 3.5.1 2022-07-14 22:25:42 +08:00
Fabian Boehm
4c2ce4b931 Add error for EBADARCH
That's apparently errno 86 on macOS, and it's triggered when the
architecture is wrong.

I'll leave other macOS errors to the macOS users.

See #9052.

(cherry picked from commit 60f87ef3be)
2022-07-14 13:25:32 +08:00
Fabian Boehm
98838ac429 Fix special readline functions after and/or
Here we needed to handle self-insert immediately, but we ended up
returning it.

Fixes #9051

(cherry picked from commit d920610f96)
2022-07-14 12:43:12 +08:00
David Adam
62cc498e1c CHANGELOG: remove entries moved to 3.5.1 2022-07-13 23:14:25 +08:00
Fabian Boehm
e67b6c1f00 history: Refuse to merge in private mode
It makes *no* sense.

Fixes #9050.

(cherry picked from commit bd7934ccbf)
2022-07-13 23:13:33 +08:00
Fabian Boehm
1008b729a7 fish_job_summary: Format message better for multiline prompts
This was supposed to be number of lines in the prompt minus 1, but
string repeat added one.

Also it triggered even in case of the stopped job message, which is
already repainted differently.

So we add it when we need to repaint ourselves.

As a bonus add a newline before in that case so the message isn't
awkwardly printed into the commandline.

Fixes #9044.

(cherry picked from commit 80fe0a7fcb)
2022-07-13 23:12:02 +08:00
Rocka
bc30e15774 completions: add qdbus completion
(cherry picked from commit c588bd5c5c)
2022-07-13 23:10:31 +08:00
SeekingBlues
173914af65
Highlight history searches correctly (#9066)
Previously, the search text is used to find out which part of the
updated command line should be highlighted during a history search. This
approach will cause the incorrect part to be highlighted when the line
contains multiple instances of the search text.

To address this, we have to find out exactly where to highlight, i.e.
the offset of the current token in the command line (0 if not a token
search) plus the offset of the search text in the match.
2022-07-13 16:48:04 +02:00
NextAlone
1c3a8e0e11 feat: completion for reflector (#9027)
(cherry picked from commit 5642499dc2)
2022-07-13 22:21:39 +08:00
exploide
95582ef76b scp completions: added new options
(cherry picked from commit 459bbe208d)
2022-07-13 22:20:17 +08:00
Fabian Boehm
89a30841f2 printf: Print special error for invalid octal numbers
(tbh these were always a mistake)

See #9035

(cherry picked from commit 13a9f6b64e)
2022-07-13 22:18:59 +08:00
ridiculousfish
9397ede963 Clear signals after running initial commands
If you run an initial command via `fish -c`, and that command is
cancelled e.g. via control-C, then ensure that the cancellation signal
is cleared before running config files.

Fixes #9024

(cherry picked from commit 137a4ecdf5)
2022-07-13 22:18:43 +08:00
Fabian Boehm
6e9590b220 Activate fish_vi_cursor for tmux
Discussions with the tmux maintainer show that:

1. We no longer need the passthrough sequence at all (and it's
deactivated by default)
2. Tmux can check if the outer terminal supports cursor shaping

Fixes #8981

(cherry picked from commit b4a3b9982c)
2022-07-13 22:18:12 +08:00
Fabian Boehm
687a16b260 status fish-path: Remove "(deleted)" suffix
Fixes #9018.

(cherry picked from commit 6e0653af93)
2022-07-13 22:17:33 +08:00
David Adam
a396fdc907 CHANGELOG: work on 3.5.1 2022-07-13 21:42:18 +08:00
Johannes Altmanninger
aec8413f7b CHANGELOG: remove entries which have moved to Integration_3.5.1 2022-07-04 20:17:56 +02:00
Guy Bolton King
47d45f49e4 Remove invalid trailing period in CSI u shift-space binding
(cherry picked from commit 1f130fbfe1)
2022-07-04 20:08:30 +02:00
Johannes Altmanninger
a6898467ab Revert "completions/git: cache subcommand computation"
Commit ad9b4290e optimized git completions by adding a completion that would
run on every completion request, which allows to precompute data used by
other completion entries. Unfortunately, the completion entry is not run
when the commandline contains a flag like `git -C`. If we didn't
already load git.fish, we'd error. Additionally, we got false positive
completions for `git diff -c`.

So this hack was a very bad idea. We should optimize in another way.

(cherry picked from commit fee5a9125a)
2022-07-04 20:01:11 +02:00
Guy Bolton King
1f130fbfe1 Remove invalid trailing period in CSI u shift-space binding 2022-07-04 19:43:03 +02:00
ridiculousfish
3c6581bcc7 Relnote removal of vendored PCRE2 sources 2022-07-02 19:00:08 -07:00
Fabian Boehm
eea9d1a5de CHANGELOG set --show showing inherited vars 2022-06-27 20:34:24 +02:00
Fabian Boehm
0f5ce57ec7 CHANGELOG 2022-06-27 17:02:20 +02:00
Johannes Altmanninger
fee5a9125a Revert "completions/git: cache subcommand computation"
Commit ad9b4290e optimized git completions by adding a completion that would
run on every completion request, which allows to precompute data used by
other completion entries. Unfortunately, the completion entry is not run
when the commandline contains a flag like `git -C`. If we didn't
already load git.fish, we'd error. Additionally, we got false positive
completions for `git diff -c`.

So this hack was a very bad idea. We should optimize in another way.
2022-06-26 23:02:26 +02:00
Michael Jarvis
d6d2c9cd1e Add placeholder text to silence sphinx-doc warning
[100%] Building HTML documentation with Sphinx
../CHANGELOG.rst:42: ERROR: Document or section may not begin with a transition.
[100%] Built target sphinx-docs

This is essentially a duplicate of commit cd1f0cc5d  :-)
2022-06-22 20:44:39 -07:00
Fabian Boehm
c1fd99188f CHANGELOG 2022-06-21 21:14:13 +02:00
ridiculousfish
137a4ecdf5 Clear signals after running initial commands
If you run an initial command via `fish -c`, and that command is
cancelled e.g. via control-C, then ensure that the cancellation signal
is cleared before running config files.

Fixes #9024
2022-06-20 13:28:58 -07:00
Fabian Boehm
e98b7d1a56 CHANGELOG 2022-06-20 17:43:49 +02:00
Fabian Boehm
8652a21a10 CHANGELOG: Remove superfluous backtick 2022-06-17 21:56:44 +02:00
Johannes Altmanninger
4fcf971f0f Changelog for #9020 2022-06-17 07:22:08 +02:00
Fabian Boehm
42a9dfa08a Start CHANGELOG for 3.6.0 2022-06-16 19:19:02 +02:00
David Adam
98bf01568d Release 3.5.0 2022-06-16 20:49:19 +10:00
David Adam
9cbd1aa147 CHANGELOG: work on 3.5.0 2022-06-16 20:41:41 +10:00
David Adam
8d7970bcb1 CHANGELOG: work on 3.5.0 2022-06-15 23:00:03 +10:00
David Adam
959ff84567 CHANGELOG: work on 3.5.0 2022-06-15 22:16:22 +10:00
David Adam
83b016945e CHANGELOG: work on 3.5.0 2022-06-14 23:05:38 +08:00
Fabian Boehm
e54985bebb Some changelog rewording 2022-06-13 17:57:54 +02:00
ridiculousfish
b41c086984 Bravely allow setting the cursor shape in iTerm2 by default
The recent improvements to multiline prompts and vi-mode in #3481 appear
to be sufficient to make iTerm2 well behaved, so remove our hack which
disabled it by default.

Fixes #3696
2022-06-12 13:19:26 -07:00
ridiculousfish
9f2cc4df36 Save the screen status more often
The fix for #3481 caused us to save the screen status after external
commands were run, fixing an unnecessary abandon-line when switching
modes. But we may also run commands not directly as part of a binding,
but instead via an on-variable event, e.g. for fish_bind_mode.

Extend this fix to all bindings, guarded by changes to exec_count. Now
any time an external command runs as part of a binding we should pick up
changes to the tty and not abandon the line.

Fixes #3481 again.
2022-06-12 13:16:29 -07:00
Fabian Boehm
6c5f86b2f7 CHANGELOG for 3.5.0
Should now be complete in terms of issues
2022-06-11 11:42:15 +02:00
Fabian Boehm
0c0cb1784d CHANGELOGGGE 2022-06-11 10:40:03 +02:00
Fabian Boehm
f544fc604e Changelog terlar prompt 2022-06-08 21:25:33 +02:00
Fabian Homborg
2bc5f3c013 Changelog 2022-06-07 13:33:06 +02:00
David Adam
bf522c9c76 CHANGELOG: work on 3.5.0 2022-06-07 10:48:57 +08:00
ridiculousfish
b8ad117e87 Save the screen status after running command bindings
This concerns running a key binding which invokes a command. If that
command modifies the tty, then fish will spot the modification later and
then react to it by redrawing the prompt. However tty modifications may
be benign or desirable; for example switching the cursor from a line to
a block. Fix this by re-fstating the tty after running external
commands.

Fixes #3481
2022-06-06 11:47:27 -07:00
ridiculousfish
49567a060e Relnote fix for commandline
Relnotes #8807
2022-06-04 15:35:47 -07:00
SeekingBlues
cf620c829b Improve newline behavior of kill-whole-line
Previously, `kill-whole-line` kills the line and its following
newline. This is insufficient when we are on the last line, because
it would not actually clear the line. The cursor would stay on the
line, which is not the correct behavior for bindings like `dd`.

Also, `cc` in vi-mode used `kill-whole-line`, which is not correct
because it should not remove any newlines. We have to introduce
another special input function (`kill-inner-line`) to fix this.
2022-06-04 13:45:25 -07:00
Fabian Homborg
9c53033f54 CHÄNGELÖG 2022-05-30 20:52:05 +02:00
Fabian Homborg
5a610f60d7 CHANGELOG: Indent properly 2022-05-30 17:22:38 +02:00
Fabian Homborg
f148a0ec35 CHANGELOG path 2022-05-29 21:11:37 +02:00
ridiculousfish
cf2ca56e34 Allow trapping SIGINT and SIGTERM in scripts
This teaches `--on-signal SIGINT` (and by extension `trap cmd SIGINT`)
to work properly in scripts, not just interactively. Note any such
function will suppress the default behavior of exiting. Do this for
SIGTERM as well.
2022-05-28 17:44:13 -07:00