Commit Graph

10243 Commits

Author SHA1 Message Date
David Adam
665ae3787a Switch to runtime check for /proc/self/stat
Removes a compile-time check that may have affected cross-compilation.

Work on #1067.
2019-04-30 16:23:28 +08:00
Fabian Homborg
e8fd83ca25 docs/index: Remove wrong "configuration variables"
Hat-tip to @enzotib on gitter.

[ci skip]
2019-04-29 21:19:43 +02:00
Wilke Schwiedop
95346770d3 Update emaint.fish 2019-04-29 18:33:37 +02:00
Wilke Schwiedop
78e6631e53 formatting 2019-04-29 18:33:37 +02:00
Wilke Schwiedop
05f79335cc completions/emerge: add verbose-conflicts 2019-04-29 18:33:37 +02:00
Wilke Schwiedop
1b3643270d completions/epkginfo: add completion 2019-04-29 18:33:37 +02:00
Wilke Schwiedop
d0c3a4f33f completions/equery: shorten descriptions 2019-04-29 18:33:37 +02:00
Wilke Schwiedop
34f50883a4 completions/ebuild: add pretend command 2019-04-29 18:33:37 +02:00
Wilke Schwiedop
52450dc864 completions/emaint: fix logs command 2019-04-29 18:33:37 +02:00
Fabian Homborg
389f5074ad Add test for argparse crash
43929ced9
2019-04-29 17:03:16 +02:00
Fabian Homborg
43929ced90 src/builtin_argparse: Work around wgetopt crash
If on the last argument, and it was an unrecognized option, we can't
call `wgetopt_long()` again, or it'll crash.
2019-04-29 16:55:55 +02:00
Fabian Homborg
8c9359fdd4 src/builtin_argparse: Add --ignore-unknown flag
This keeps all unknown options in $argv, so

```fish
argparse -i a/alpha -- -a banana -o val -w
```

results in $_flag_a set to banana, and $argv set to `-o val -w`.

This allows users to use multiple argparse passes, or to simply avoid
specifying all options e.g. in completions - `systemctl` has 46 of
them, most not having any effect on the completions.

Fixes #5367.
2019-04-29 15:57:56 +02:00
ridiculousfish
d8ac051f89 Move selection_direction_t to pager.h and make it a class enum 2019-04-28 14:06:03 -07:00
ridiculousfish
3c9f95594a Update Dockerfile for cmake3 2019-04-28 11:41:37 -07:00
ridiculousfish
2507162f80 Revert "Add a test for autoload_t"
This reverts commit 51c62d6cc6.

Back out the test while I attempt to fix it
2019-04-27 20:14:06 -07:00
ridiculousfish
51c62d6cc6 Add a test for autoload_t 2019-04-27 16:16:48 -07:00
ridiculousfish
4ff50eba41 Remove autoload_t, rename autoloader_t to autoload_t
Now that there are no more clients of autoload_t, delete it and
rename autoloader_t to autoload_t. Also clean up the headers.
2019-04-27 15:47:08 -07:00
ridiculousfish
68a28106b2 Reimplement completion autoloading via autoloader_t
This switches the completion autoloading machinery to autoloader_t.
2019-04-27 15:37:24 -07:00
ridiculousfish
960266fe24 Reimplement the function store and autoloading
This cleans up how functions are stored and autoloaded. It eliminates the
recursive lock. Instead there is a single normal owning_lock that protects
the entirety of the function data. Autoloading is re-implemented via the
new autoloader_t.
2019-04-27 15:30:11 -07:00
ridiculousfish
3950dab9ff Add autoloader_t
autoloader_t will be the reimplementation of autoloading. Crucically it no
longer manages any locking or loading itself; instead all locking and loading
is performed by clients. This makes it easier to test and helps limit its
responsibilities.
2019-04-27 15:26:18 -07:00
ridiculousfish
b7ad6b5bdc Add autoload_file_cache_t
This will provide the "backing store" for autoloading.
2019-04-27 15:09:24 -07:00
ridiculousfish
6ec7c50ace Stop removing functions and completions in autoload
autoloading has a "feature" where functions are removed in an LRU-fashion.
But there's hardly any benefit in removing autoloaded functions. Just stop
doing it.
2019-04-27 14:49:05 -07:00
ridiculousfish
7b44b5ef15 Titlecase LRU template parameters 2019-04-27 12:07:16 -07:00
ridiculousfish
f297543ca1 Make owning_lock's template parameter titlecase instead of uppercase 2019-04-27 12:04:36 -07:00
Fabian Homborg
af0e08e9f1 argparse: Use the current function name by default
This makes the `--name` option usually unnecessary.

See #5835.
2019-04-27 15:55:49 +02:00
Fabian Homborg
eb0e0a4ab4 docs/argparse: Fix links
Fixes #5847.

[ci skip]
2019-04-27 12:16:53 +02:00
puenka
30f040ed36 Add speedtest-cli/speedtest completion (#5840)
* Add speedtest-cli/speedtest completion

Added a completion file for speedtest-cli utility (https://github.com/sivel/speedtest-cli) as shipped from various package repositories.

* added no-files parameter

* Remove inheritance to speedtest

* Create speedtest.fish
2019-04-27 09:34:28 +02:00
ridiculousfish
9bc5d60eaf Clean up enum_set.h header
Include a missing array header, and switch to idiomatic include guards.
2019-04-26 16:08:19 -07:00
Fabian Homborg
e084d097d5 docs: Remove <asis> markup
This isn't needed anymore.

[ci skip]
2019-04-26 19:25:30 +02:00
Fabian Homborg
ff62f2ae08 docs/bind: Document path-component and word
Plus fix some formatting.

[ci skip]
2019-04-26 19:23:24 +02:00
Fabian Homborg
94ece96bce CHANGELOG path-component
I should really add this immediately.

[ci skip]
2019-04-26 19:17:27 +02:00
Fabian Homborg
009ecfd7e6 src/tokenizer: Add ":@" to the list of non-path-component chars
This makes kill-path-component stop there.

Fixes #5841.
2019-04-26 19:16:21 +02:00
Fabian Homborg
ebf1914a35 CHANGELOG complete -C change
[ci skip]
2019-04-26 16:11:43 +02:00
David Gowers
38cadc9d4f Variables as commands are in fact supported, eval docs should not claim otherwise. (#5819)
Provide an example that somewhat justifies eval's existence in light of this change.

Also correct similar misinformation found in a comment.
2019-04-26 15:30:13 +02:00
Fabian Homborg
22ce8c23c6 builtin_complete: Allow complete -C something
This is a long-standing issue with how `complete --do-complete` does
its argument parsing: It takes an optional argument, so it has to be
attached to the token like `complete --do-complete=foo` or (worse)
`complete -Cfoo`.

But since `complete` doesn't take any bare arguments otherwise (it
would error with "too many arguments" if you did `complete -C foo`) we
can just take one free argument as the argument to `--do-complete`.

It's more of a command than an option anyway, since it entirely
changes what the `complete` call _does_.
2019-04-26 15:02:29 +02:00
ridiculousfish
cd86c0ee88 Remove the COMPLETE_SEP define
It was unused.
2019-04-25 14:23:37 -07:00
ridiculousfish
96bc8a14ca Promote completion_mode_t to a real type
Eliminate big #defines like NO_COMMON.
2019-04-25 14:21:06 -07:00
ridiculousfish
d962668aa0 Remove PATH and COMMAND defines
Also clean up a bit of builtin_complete
2019-04-25 13:26:43 -07:00
ridiculousfish
496529b20a Remove EXPAND prefix from expand_flags and lowercase them 2019-04-25 11:34:49 -07:00
ridiculousfish
d8ab6290e8 Switch expand_flags_t to enum_set 2019-04-25 11:23:03 -07:00
ridiculousfish
dcaac58f45 Rename expand_error_t to expand_result_t and make it class enum
Also lowercase it all.
2019-04-25 10:47:28 -07:00
ridiculousfish
b54c44f2f6 Migrate expansion stages to a new type expander_t
This avoids having to pass around so many parameters during expansion.
2019-04-25 10:47:28 -07:00
Mahmoud Al-Qudsi
ae11bf4dcb Add completions for git show $rev:$path
This command can be used to "`cat`" the contents of `$path` as of `$rev`.

These are "silent" completions, e.g. while this adds a completion for
`git show master:foo`, the completions for `git show <TAB>` are not
affected; these "advanced" completions kick in only after at least
`git show master:<TAB>` to prevent completion pollution or slowing down
tab completions in the typical case (as this would cause each valid and
possibly unique $rev completion result to complete to `n*$rev`
completions for *n* files.

[ci skip]
2019-04-23 21:54:09 -05:00
Mahmoud Al-Qudsi
4bdab33a00 Add dynamic cipher completion to ssh -c ...
[ci skip]
2019-04-22 15:17:38 -05:00
Fabian Homborg
82052a6cc9 Don't start focus reporting until later
[ci skip]
2019-04-21 20:26:57 +02:00
Fabian Homborg
b5351bce1b Bind tmux focus reporting as --preset bindings
Purely cleanup, basically.

[ci skip]
2019-04-21 19:48:46 +02:00
Aaron Gyes
51e963bf44 fixup last commit 2019-04-21 09:07:29 -07:00
Aaron Gyes
9d84b45256 __fish_print_help: remove indent
Do this lame replacement in order to make some_builtin --help
output less tacky.
2019-04-21 02:06:29 -07:00
Aaron Gyes
f309ae05b6 is_visual_escape_seq: whittle down the escape sequences attempted
Some of these we do not need to worry about actually being used
in a prompt.
2019-04-20 17:03:27 -07:00
Mahmoud Al-Qudsi
32ad1a6e62 Add basic completions for FreeBSD's camcontrol 2019-04-19 20:57:27 -05:00