Commit Graph

11193 Commits

Author SHA1 Message Date
Jason
5107de395d Move __fish_print_xdg_desktop_file_ids into xdg-mime completion script 2019-12-04 20:51:21 +01:00
Jason
9c15b5b7a4 Move __fish_systemd_machines into machinectl completion script 2019-12-04 20:51:09 +01:00
Jason
b658b421ad Move __fish_ports_dirs into ports completion script 2019-12-04 20:50:55 +01:00
Jason
40832f897c Move __fish_portage_print_repository_names into emaint completion script 2019-12-04 20:50:28 +01:00
Jason
69255d5641 Move __fish_parse_configure into configure completion script 2019-12-04 20:50:19 +01:00
Jason
b3f8a93e02 Move __fish_print_abook_emails into mutt completion script 2019-12-04 20:50:01 +01:00
Michael Jarvis
1be8277f41 Minor tweak to silence warning
Silences a clang++ warning:

"using the result of an assignment as a condition without parentheses"
2019-12-03 19:34:37 -08:00
Jason
dacc0b595c Dont clobber fish_browser if cygstart is available 2019-12-03 18:07:18 +01:00
Johannes Altmanninger
c3374ffd08 Use read --tokenize instead of eval for $BROWSER & $EDITOR 2019-12-03 12:19:16 +01:00
David Adam
d90a62c151 fish.spec: depend on Python on CentOS/RHEL 8 for tests 2019-12-03 15:05:38 +08:00
David Adam
1f6f1b347c fish.spec: use system pcre2 on all platforms except RHEL 6/7 2019-12-03 14:47:52 +08:00
Shun Sakai
62d435f25b Add completions of --committer-date-is-author-date and --ignore-date for git-rebase 2019-12-02 15:23:56 +01:00
Shun Sakai
b4f0a67ef2 Add git-count-objects and git-gc completions 2019-12-02 15:23:56 +01:00
edef
031d30c8ac Handle multiple arguments in $PAGER
$PAGER may contain arguments, and should thus be word-split before 
invocation.
2019-12-02 15:15:33 +01:00
Fabian Homborg
d91b0f86f4 Repaint all prompts if the variables change
This is a good idea in general and simplifies the Classic + VCS
prompt.
2019-12-01 18:15:36 +01:00
Fabian Homborg
00fc36c3eb docs: Simplify argparse docs
This was a bit stuffy and verbose, so try to make it a tad more human.

Also don't mention `fish_opt` constantly. It's not actually all that
useful as argparse isn't as difficult to use as we thought.

[ci skip]
2019-12-01 18:15:36 +01:00
Fabian Homborg
115892ccd2 alias: Use read --tokenize
This did some weird unescaping to try to extract the first word.

So we're now more likely to be *correct*, and the alias benchmark is
about 20% *faster*.

Call it a win-win.
2019-12-01 18:14:26 +01:00
Fabian Homborg
86133b0a2b Add read --tokenize
This splits a string into variables according to the shell's
tokenization rules, considering quoting, escaping etc.

This runs an automatic `unescape` on the string so it's presented like
it would be passed to the command. E.g.

    printf '%s\n' a\ b

returns the tokens

printf
%s\n
a b

It might be useful to add another mode "--tokenize-raw" that doesn't
do that, but this seems to be the more useful of the two.

Fixes #3823.
2019-12-01 18:14:26 +01:00
Jason
2fd1e4ab75 Move __fish_complete_unrar into the completion script 2019-12-01 17:35:35 +01:00
Jason
fa373c102c Move __fish_complete_wvdial_peers into the completion script 2019-12-01 17:34:46 +01:00
Jason
6486349725 Move __fish_complete_tar into the completion script 2019-12-01 17:34:27 +01:00
Jason
6245d76e57 Move __fish_complete_lsusb into the completion script 2019-12-01 17:33:07 +01:00
Jason
b3291619f4 Add missing logic to trampoline block 2019-12-01 17:31:41 +01:00
Jason
b358cee5fe Move __fish_complete_setxkbmap into the completion script 2019-11-30 12:12:18 +01:00
Jason
d1a153cc7e Dont convert path if browser is going to be run in terminal 2019-11-30 09:33:38 +01:00
Jason
585e4e905b Dont convert path if browser is going to be run in terminal 2019-11-30 09:33:38 +01:00
Jason
8192fb2f2a Fix Windows path support for WSL/Cygwin
- Use wslpath under WSL to provide full path to help file
- Use eval on the final command to cmd.exe
- Use trampoline where necessary for Cygwin
2019-11-30 09:33:38 +01:00
Fabian Homborg
1f976a5041 Disavow IRC channel
I don't know of any fish dev on there, so it's not a good channel to
reach us and I have no idea how good it is, so it's best to just ditch it.
2019-11-30 09:29:49 +01:00
Rosen Penev
6b6884aec6 osx/install: Run through shellcheck
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-11-30 09:27:50 +01:00
Rosen Penev
72bf267d96 make_pkg: Run through shellcheck
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-11-30 09:27:50 +01:00
Rosen Penev
9fe7efb82f git_version_gen: Run through shellcheck
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-11-30 09:27:50 +01:00
ridiculousfish
39e5ffde93 Rename __fish_complete_file_url to __fish_evince_complete_file_url
As the function is now private to evince, use a less generic name.
2019-11-30 00:23:54 -08:00
mk2
c36d802dda Move __fish_complete_file_url to evince.fish 2019-11-30 00:21:47 -08:00
ridiculousfish
fb8e90de28 clang-format .cpp files 2019-11-29 23:57:19 -08:00
Rosen Penev
e4a7e7d4f7 [clang-tidy] Use strcmp family properly
Found with bugprone-suspicious-string-compare

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-11-29 23:46:51 -08:00
Rosen Penev
e45ae9df49 [clang-tidy] Enclose macro arguments in ()
Found with bugprone-macro-parentheses

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-11-29 23:46:51 -08:00
Rosen Penev
9507c3a159 [clang-tidy] Don't initialize member functions
Found with readability-redundant-member-init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-11-29 23:46:51 -08:00
Rosen Penev
6f4a9d527c [clang-tidy] Use C++ using instead of C typedef
Found with modernize-use-using

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-11-29 23:46:51 -08:00
Rosen Penev
7d1cc992e5 [clang-tidy] Simplify boolean expressions
Found with readability-simplify-boolean-expr

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-11-29 23:46:51 -08:00
Rosen Penev
4087b2ee15 [clang-tidy] Use bool literals
Found with modernize-use-bool-literals

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-11-29 23:46:50 -08:00
Rosen Penev
c3fa8c04bf [clang-tidy] Don't empty initialize strings
Found with readability-redundant-string-init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-11-29 23:46:50 -08:00
Rosen Penev
87e24db5ef driver.sh: Run through shellcheck 2019-11-28 20:26:01 +01:00
Rosen Penev
a755bc5cf6 make_tarball.sh: Run through shellcheck 2019-11-28 18:57:38 +01:00
ridiculousfish
b5d0075406 Use iothread pool for background fillthreads
Background fillthreads are used when we want to populate a buffer from an
external command. The most common is command substitution.

Prior to this commit, fish would spin up a fillthread whenever required.
This ended up being quite expensive.

Switch to using the iothread pool instead. This enables reusing the same
thread(s), which prevents needing to spawn new threads. This shows a big
perf win on the alias benchmark (766 -> 378 ms).
2019-11-27 12:03:56 -08:00
ridiculousfish
106af5f56a Migrate some iothread functions into member functions of thread_pool_t
This reintroduces commits 22230a1a0d
and 9d7d70c204, now with the bug fixed.

The problem was when there was one thread waiting in the pool. We enqueue
an item onto the pool and attempt to wake up the thread. But before the
thread runs, we enqueue another item - this second enqueue will see the
thread waiting and attempt to wake it up as well. If the two work items
were dependent (reader/writer) then we would have a deadlock.

The fix is to check if the number of waiting threads is at least as large
as the queue. If the number of enqueued items exceeds the number of waiting
threads, then spawn a new thread always.
2019-11-27 12:03:56 -08:00
Fabian Homborg
83f153eb4c Revert "builtin_printf: Use proper functions"
This reverts commit 1102b83b2d.

wcstold_l is not available on musl and we don't currently have our "own" implementation.

Revert for now until we do.
2019-11-27 18:50:28 +01:00
mk2
439470b048 Move __fish_complete_ant_targets to ant.fish 2019-11-27 16:32:37 +01:00
Fabian Homborg
9a3fb3e265 Use POSIX sh in the benchmark driver
There are reasons to use bash, `hash` is not one of them, as `command
-v` is perfectly capable and in POSIX.

[ci skip]
2019-11-27 16:21:11 +01:00
ridiculousfish
efe6fb3c3b Use hyperfine in the benchmark driver if available 2019-11-26 11:10:04 -08:00
Fabian Homborg
662fb3f3d1 Fix line numbers in functions
This added the function offset *again*, but it's already included in
the line for the current file.

And yes, I have explicitly tested a function file with a function
defined at a later line.

Fixes #6350
2019-11-26 18:12:24 +01:00