Commit Graph

12237 Commits

Author SHA1 Message Date
ridiculousfish
1fd0cd5510 Avoid forming owning_lock of incomplete type in history
Older libstdc++ will error on this.

Partially addresses #7023
2020-05-22 13:36:46 -07:00
Johannes Altmanninger
285861d346 Do notify about jobs that were continued outside fish
When sending SIGCONT to a stopped job, this behaves now
a bit more like a job that was continued by the bg builtin;
bg uses job_t::continue_job which seems overkill here.
2020-05-22 21:28:54 +02:00
Johannes Altmanninger
a9b60d2493 Call fish_prompt after background job finishes
We don't need to call it if a job was stopped, because in that case
read_i() will fire fish_prompt already, because the newly stopped job
was probably a foreground job.

Fixes #1018
2020-05-22 21:24:59 +02:00
David Adam
cbf53623b4 README: refer to Linux instructions for WSL to get newest version
As suggested in #6941.

[ci skip]
2020-05-21 22:48:07 +08:00
Fabian Homborg
e51f4e5fc9 Don't print a warning about tcgetattr if stdin is not a tty
I don't know why this doesn't happen more often, but if stdin is not a
tty not being able to get terminal attributes from it is *expected*?
2020-05-21 10:31:32 +02:00
Fabian Homborg
3af715d36f test_helper: Limit signal numbers more
This just produced a spurious "Unknown signal" error on NetBSD and OpenBSD, and
the number picked was arbitrary. So let's just use the maximum that
appears to work everywhere.

(I will hate this if I test it elsewhere and need to reduce it to 62)

(This is a squashed commit, I did indeed hate it when I moved from
NetBSD to OpenBSD)
2020-05-21 10:30:54 +02:00
Fabian Homborg
9d1129f14c docs/tutorial: Fix duplicate sentence
Fixes #7024.
2020-05-20 19:20:12 +02:00
Johannes Altmanninger
6746060c14 Run fish_indent on all fish files in share/ 2020-05-19 21:15:39 +02:00
Johannes Altmanninger
91ccaae5bf fish_indent: fix error message on ENOENT 2020-05-19 21:15:11 +02:00
Johannes Altmanninger
c54ee22c46 Refactor: remove unnecessary exports 2020-05-19 21:15:11 +02:00
Johannes Altmanninger
3819696091 Fix Kakoune completions 2020-05-19 21:15:11 +02:00
Charles Gould
b673f32b93 Add fish debugging examples 2020-05-19 21:07:33 +02:00
Charles Gould
a0faac400d Print warning on failure to match debug category 2020-05-19 21:07:33 +02:00
Charles Gould
a7aca37f9b Print enabled debug categories 2020-05-19 21:07:33 +02:00
Shun Sakai
cc039e29ce Add completions for Docutils 2020-05-19 21:02:55 +02:00
Soumya
518170b299 Also call fish_job_summary for foreground sigint
The default implementation will not print any output in that case, but this provides users with additional flexibility when it comes to customising the shell's behaviour.
2020-05-19 20:39:10 +02:00
Soumya
324fa64114 Add fish_job_summary, called whenever a job ends, stops, or is signalled
This allows users to customise the behaviour of the shell by redefining the function. This is similar to how fish_title or fish_greeting behave, where the default implementation can be easily overridden.

The function receives as arguments the job id, command line, signal name and signal description.
2020-05-19 20:39:10 +02:00
Fabian Homborg
e3c4692031 docs/bind: Overhaul 2020-05-18 20:48:36 +02:00
Fabian Homborg
43df5ba828 completions: Stop checking for command existence
Since 4414d5c888 (in fish 3.0.0) we
don't autoload completions if the command doesn't exist.

So there is no need to check inside the scripts anymore.

Whats more, a few (like pip and cabal) checked `command -q` instead of
`type -q`, meaning they'd fail if someone used a function instead of a
command of that name.

If the *command* actually needs to exist, checks like that are still
warranted, like in `npm` where aliasing it to `nvm` is popular.

A teensy additional bit: Make `sysctl -w` the same as `sysctl
--write`. That description was bogus.
2020-05-18 20:48:36 +02:00
Fabian Homborg
ec759fb45e printf: Overhaul docs 2020-05-18 20:48:36 +02:00
Fabian Homborg
56f24f08d7 printf: Don't print an error if not given an argument 2020-05-18 20:48:36 +02:00
Jason Nader
3cfcbe0975 completions: shotern atom descriptions 2020-05-18 18:54:21 +02:00
Enrico Borba
f10de5f653
__fish_prepend_sudo: Toggle "sudo" on multiple presses (#7012)
At the moment calling __fish_prepend_sudo multiple times does not toggle
sudo, and also unnecessarily uses the `-c` flag to `commandline` to see if
the first token on the commandline is "sudo".

This change removes the `-c` switch and also toggles "sudo" on multiple
calls to __fish_prepend_sudo, while maintaining the cursor position and
while maintaining any spaces between "sudo" and the next token on the
commandline.
2020-05-17 11:15:15 +02:00
Fabian Homborg
495cbb185f completions/zpool: Use --inherit-variable
The local-exported variable will have disappeared by the time the
function is called.

"-V"/"--inherit-variable" is meant for something like this.

Fixes #7011
2020-05-16 23:02:47 +02:00
Fabian Homborg
9be510fa6b Update littlecheck
This used the wrong operator (`()` instead of `[]`) to look up in a dict.
2020-05-16 15:16:13 +02:00
Fabian Homborg
5bd1536f06 CHANGELOG terminal modes 2020-05-16 13:09:36 +02:00
Fabian Homborg
29754f3540 Keep terminal modes for external commands
This allows tools like `stty` to set the terminal modes and fish will
honor them, for external commands.

The modes for fish are kept as they are.

Until now, the only change fish would do to the external modes is to
disable flow control *every time*, this changes it to only disabling
it on startup.

After that we don't apply *any* changes to the external modes (no
checks or validation or...), because we've never done that (other than
flow control), and it's not been a problem.

Fixes #2315.
2020-05-16 13:04:51 +02:00
Johannes Altmanninger
27f9920c7f docs: sort some electric variables 2020-05-16 12:18:21 +02:00
Johannes Altmanninger
e03c375ee3 Purge remnants of process expansion, document {fish,last}_pid 2020-05-16 11:58:12 +02:00
Johannes Altmanninger
f9447dc72f help.fish: fix help for the separate completion page 2020-05-16 11:58:12 +02:00
Johannes Altmanninger
8e18f683a7 help.fish: fix not using anchors for some help topics
The completions for help know many more help topics, it makes no sense
to whitelist them here.

Fix anchor links for tutorial sections.

Remove some dead code: the "man" branch was unreachable because of the
earlier (__fish_print_commands) case.
2020-05-16 10:34:32 +02:00
Johannes Altmanninger
67531acc25 fish --help: remove outdated information about exit status 2020-05-16 10:33:13 +02:00
Johannes Altmanninger
ec2371fb79 Some more precautionary uses of set --local 2020-05-15 21:35:48 +02:00
Fabian Homborg
62f1ed0b5e completions/git: More files for git commit
Fixes #7009.
2020-05-15 20:26:07 +02:00
Moritz Reiter
f318da436e Remove text duplicate in tutorial 2020-05-15 20:09:07 +08:00
Johannes Altmanninger
49c5f96470 Use set -l to force use of a local variable
Bare set overwrites a global/universal variable if it exists.
2020-05-15 08:25:07 +02:00
Johannes Altmanninger
fe6c76d058 Read into local variables in some completions
Otherwise these might modify global or universal vars.
2020-05-15 07:14:54 +02:00
Atanas Yankov
bb458c7186
Add some missing journalctl completions (#6989) 2020-05-15 06:58:11 +02:00
Uy Ha
76bbcb9804 Add check to let Windows Terminal pass 2020-05-14 18:02:50 -07:00
exploide
1ccec532f0 __fish_print_hostnames: skip ssh host definitions containing wildcards 2020-05-14 22:34:47 +02:00
LawAbidingCactus
f71737e58a Add $fish_force_vi_cursor variable to allow cursor setting on unsupported terminals 2020-05-14 22:25:20 +02:00
Johannes Altmanninger
a8e9f560e4 fish_clipboard_copy: also copy newlines from mult-line commands 2020-05-14 21:07:37 +02:00
Shun Sakai
3ee4c139b3 Add completions for Sphinx 2020-05-13 20:31:01 -07:00
Shun Sakai
230dbae0b9 Add completions for cmark 2020-05-13 20:31:01 -07:00
Shun Sakai
ed4dd1dd4d Add completions for Asciidoctor 2020-05-13 20:31:01 -07:00
Akatsuki
46c253b9d6 completions/set: add --path and --unpath
Add missing options:
--path causes the specified variable to be treated as a path variable, meaning it will automatically be split on colons, and joined using colons when quoted (echo "$PATH") or exported.
--unpath causes the specified variable to not be treated as a path variable. Variables with a name ending in "PATH" are automatically path variables, so this can be used to treat such a variable normally.

[ci skip]
2020-05-13 20:28:35 -07:00
David Adam
8f50e5721d pcre2: re-import some sources overzealously removed in 73ecf1576b
These are required for the build to succeed without CMake surgery.
2020-05-12 13:28:14 +08:00
David Adam
73ecf1576b pcre2: import version 10.35
Files removed as described in b418e36f2
2020-05-12 06:50:32 +08:00
David Adam
3252d0fd03 pcre2: drop FindPackageHandleStandardArgs macro
This macro is included in standard CMake, unused, and 13 years out of
date.
2020-05-12 06:50:32 +08:00
Fabian Homborg
9022211195 Travis: PCRE2 is already installed on osx
This removes the before_install step because it's currently failing.
The error message says pcre2 is already installed anyway, so we can
skip the entire thing and remove brew from the equation.
2020-05-11 18:39:04 +02:00