Commit Graph

11625 Commits

Author SHA1 Message Date
Jason Nader
7d89cadd58 Stringify vared completions 2020-01-26 13:53:45 +01:00
Fabian Homborg
23042b6a43 Remove unused "prefix" variable in prompt presets
[ci skip]
2020-01-26 12:29:06 +01:00
Jason
bcf2e2cdbd Remove unused variable 2020-01-26 12:28:01 +01:00
Jason Nader
3142ef6dbc Add interface label/name to the completions for -b 2020-01-26 12:26:47 +01:00
ridiculousfish
d29bc720cd Remove some nonsense in exec_close
exec_close should assert that the fd is valid, then loop while EINTR.
Nothing else is needed.
2020-01-25 19:08:30 -08:00
ridiculousfish
86897cafd6 Clean up, debug, optimize some command description generation
Use some more move semantics to reduce allocations.

Correctly handle the case where the completion is empty. For example, if
you type:

    ls<tab>

we get an empty completion (since ls is already a valid command), but we
still want to show its description.

Remove some unsafe statics - these are unsafe today in weird cases where
completions might invoke complete recursively, and also will soon be
unsafe with concurrent execution.
2020-01-25 18:26:31 -08:00
ridiculousfish
38f4330683 Rationalize $status and errors
Prior to this fix, fish was rather inconsistent in when $status gets set
in response to an error. For example, a failed expansion like "$foo["
would not modify $status.

This makes the following inter-related changes:

1. String expansion now directly returns the value to set for $status on
error. The value is always used.

2. parser_t::eval() now directly returns the proc_status_t, which cleans
up a lot of call sites.

3. We expose a new function exec_subshell_for_expand() which ignores
$status but returns errors specifically related to subshell expansion.

4. We reify the notion of "expansion breaking" errors. These include
command-not-found, expand syntax errors, and others.

The upshot is we are more consistent about always setting $status on
errors.
2020-01-25 17:28:41 -08:00
ridiculousfish
81e78c78aa Rename eval_result_t to end_execution_reason_t
We're getting ready to stop returning eval_result_t from parser_t::eval
2020-01-25 14:11:32 -08:00
ridiculousfish
e640a01ea5 Express cancellation as a possible result of expand_string
This allows us to properly thread control-C signals from command
substitutions into the expanding string.
2020-01-25 14:11:32 -08:00
ridiculousfish
8a9c39d433 Add a test for some 'status' subcommands 2020-01-25 14:10:45 -08:00
ridiculousfish
788f359cda Make the cd check more robust on macOS
macOS `mktemp -d` likes to return symlinks. Guard against that possibility.
That allows the test to succeed when run directly, instead of through the
build target.
2020-01-25 12:59:18 -08:00
David Adam
e74befd3ab Merge branch 'Integration_3.1.0' 2020-01-25 22:43:01 +08:00
David Adam
9b6a5b99a9 CHANGELOG: final work towards 3.1b1 2020-01-25 22:42:12 +08:00
David Adam
dc1ed1abf9 fish.spec: add overrides for FreeDesktop file on SUSE 2020-01-25 22:34:42 +08:00
Fabian Homborg
f5a3a259dc Fix littlecheck on python 2 2020-01-25 15:31:10 +01:00
David Adam
567aa1f4e3 debian packaging: bump in Debian standards versioning
Previous commits bring current packaging into line with version 4.1.5.
2020-01-25 21:10:01 +08:00
David Adam
001ae861fb debian packaging: change priority from deprecated "extra" to "optional" 2020-01-25 21:10:01 +08:00
David Adam
927f4f64ce debian packaging: drop menu entry as FreeDesktop menu now installed 2020-01-25 21:10:01 +08:00
Fabian Homborg
cf508ee228 tests/job-ids: Wait for job to die
It was possible to start the new job and execute `jobs` again before
the job died (or we noticed it did), so the test would fail.

To properly test, we need to ensure the job has been removed. `wait`
should do it.
2020-01-25 14:06:34 +01:00
Fabian Homborg
25810b70f2 Update littlecheck
This allows:

- Running scripts via shebang (not important here)
- Progress output (so we can ditch more of our run script)
- Context (only after, for now) - this is important if there is a test failure
2020-01-25 11:54:42 +01:00
David Adam
d910bada82 fish.spec: include FreeDesktop entry in file lists 2020-01-25 18:04:14 +08:00
David Adam
f36a391f26 fish.desktop: install .desktop and icon 2020-01-25 16:48:57 +08:00
David Adam
39569f9313 Merge branch 'addusrlocal'
Closes #6508.
2020-01-25 16:13:30 +08:00
David Adam
8ff0c351a9 vendor_*.d: also create these directories in the prefix 2020-01-25 16:12:20 +08:00
David Adam
81306d3b30 vendor_*.d: include /usr/local by default as "extra" directory
Closes #5029.
2020-01-25 16:12:20 +08:00
Jason Nader
b2969f4dfb Fix typo in mplayer completions 2020-01-25 08:36:15 +01:00
ridiculousfish
4f205f38b4 Clean up a few bits about discarding buffers
We weren't properly propagating the 'discarded' stuff from output
streams to buffers. Fix that.
2020-01-24 16:08:56 -08:00
ridiculousfish
b99546e7a0 Port cmdsub tests to littlecheck 2020-01-24 15:03:59 -08:00
Jason Nader
5bfb6fef76 Stringify __fish_pwd.fish 2020-01-24 19:05:08 +01:00
Jason
2a247c7fe5 Stringify ssh completions (#6529)
* Stringify ssh completions

* Fix completions for `-b` option

* Fix completions for `-b` option
2020-01-24 18:29:17 +01:00
239
3e08083d49 Add completions for loginctl and resolvectl (#6501)
* Add completions for loginctl and resolvectl

* Add #6501

* Fix optional arguments

* Remove placeholder arguments
Fix expected arguments
2020-01-24 18:27:47 +01:00
Aaron Bieber
903fe9de48 webconfig: Use tempfile instead of ~/.cache (#6522)
OpenBSD uses [unveil(2)](https://man.openbsd.org/unveil) in chromium and
firefox. This means that things outside of directories like ~/Downloads or /tmp are not visible to the
browsers.

Change webconfig so it uses tempfile.NamedTemporaryFile to create our temp file.
2020-01-23 19:52:26 +01:00
ridiculousfish
dbbe8a2da5 Clarify expand_result_t comments 2020-01-22 11:51:40 -08:00
ridiculousfish
2af710f7c0 Eliminate expand_result_t::wildcard_match
This was an internal implementation detail that all callers had to deal
with. Just get rid of it.
2020-01-22 11:49:59 -08:00
Jason Nader
a5d625d389 Stringify j.fish 2020-01-22 17:43:18 +01:00
Jason Nader
2323a5629c Stringify netctl completions 2020-01-22 17:41:43 +01:00
Jason Nader
1cafc4eff6 Amend comments incorrectly referring to sed 2020-01-22 17:40:31 +01:00
Aaron Bieber
0918b537ac Get the list of VMs in a less fragile way. 2020-01-22 16:48:02 +01:00
Fabian Homborg
d61c188c3c Fix xdg mimetype completion
This hung when no file existed, and failed to properly find the
directories if they didn't end in a "/".

Fixes #6525

[good for 3.1.0]
2020-01-22 16:33:56 +01:00
ridiculousfish
e398f66772 Run clang-format 2020-01-21 14:43:17 -08:00
Jason Nader
6fb545cf9b Stringify gpg completions 2020-01-21 17:57:57 +01:00
Jason Nader
13a26a1c65 Remove dropbox completions 2020-01-21 16:57:27 +01:00
Jason Nader
103a26ffb1 Fix function output on FreeBSD/Cygwin systems 2020-01-21 16:55:37 +01:00
Fabian Homborg
4e931fd967 completions/kill: Offer -SIGNAME
E.g. "kill -HUP".
2020-01-20 17:51:59 +01:00
Fabian Homborg
1480865d52 Stringify make_completion_signals 2020-01-20 17:51:59 +01:00
Fabian Homborg
acefa61e8b Hardcode signal names/numbers on cygwin
Work around weirdness in Cygwin's kill implementation.

Fixes #6469.
2020-01-20 17:51:59 +01:00
David Adam
26f744037a Revert "Remove Base16 mention from CHANGELOG"
Will be in 3.1.0.
2020-01-20 20:13:59 +08:00
Shun Sakai
2035b90bfe CHANGELOG: Add keepassxc-cli completions 2020-01-20 20:13:54 +08:00
Jason Nader
f63ae0fb4d Add missing comment to bower.fish
Same comment found in yarn.fish
2020-01-20 19:45:21 +08:00
Fabian Homborg
65397d4f5e Fix tests
By changing to flog I inadvertently changed the warning text from "<W>
fish:" to "warning:".

Since that's also okay, let's leave it.
2020-01-19 15:07:06 +01:00