Commit Graph

9169 Commits

Author SHA1 Message Date
David Adam
938ce48d25 Bump version for 3.0.0 2018-12-28 21:01:03 +08:00
David Adam
0c25d7a49c CHANGELOG: 3.0.0 updates 2018-12-28 20:56:17 +08:00
David Adam
d6e315d25d cmake: define _GNU_SOURCE
Fixes the build on Cygwin. Analogous to AC_USE_SYSTEM_EXTENSIONS under Autoconf.

Closes #5423.
2018-12-20 21:36:01 +08:00
Fabian Homborg
14ee19cc1b Use HAVE_WCSTOD_L also in header 2018-12-18 11:03:33 +01:00
Aaron Gyes
57d6124e6e builtin_test: don't exit 1 for eval errors, add tests for big args
Return STATUS_INVALID_ARGS when failing due to evaluation errors,
so we can tell the difference between an error and falseness.

Add a test for the ERANGE error
2018-12-16 14:51:26 -08:00
Aaron Gyes
cf2b40040a STATUS_INVALID_ARGS = 2
The rest of the high-numbered exit codes are not values used by scripts
or builtins, they are internal to fish and come out of
the parser for example.

Prior to adding STATUS_INVALID_ARGS, builtins were usually exiting 2
if they had a special exit status for the situation of bad arguments.

Set it to 2.
2018-12-16 14:51:18 -08:00
Aaron Gyes
b404b9392c builtin_test.cpp: split a long line, add braces 2018-12-16 14:51:10 -08:00
Aaron Gyes
1f871c4d0c builtin_test.cpp: check for ERANGE and special fish_wcstoll errno
We were not parsing an in-range number when we claimed we were,
and were thus failing to error with invalid numbers and returned
a wrong test result. Fixed #5414

Also, provide the detail we can for the other error cases.
2018-12-16 14:51:02 -08:00
Fabian Homborg
e07b45f447 Revert "completions/git: Allow aliases with whitespace in the command"
This reverts commit 081e14fd21, which was bogus.
2018-12-15 11:13:38 +01:00
Fabian Homborg
081e14fd21 completions/git: Allow aliases with whitespace in the command
Fixes #5412.
2018-12-13 22:49:12 +01:00
Fabian Homborg
99ba07354a fish_vi_key_bindings: Remove weird argv handling
Instead of maybe adding "-s" and "-M" if "-s" hasn't already been
given, just add "-s" to _every_ bind invocation, and "-M" to those who
need it.

Fixes #5028.
2018-12-13 17:33:48 +01:00
David Adam
79d53a32dc history: drop use of fish_indent
Largely reverts 007d794b6e.

fish_indent is extremely resource-intensive on large inputs and can crash; it also does not handle
invalid characters gracefully.

Work on #5402.
2018-12-13 21:57:24 +08:00
Fabian Homborg
ffab420e43 Add fallback wcstod_l for musl
Just sets locale to "C" (because that's the only one we need), does
wcstod and resets the locale.

No idea why uselocale(loc) failed for me, but it did.

Fixes #5407.
2018-12-12 15:12:12 +01:00
David Adam
355cb88e38 Bump version for 3.0b1 2018-12-11 22:04:20 +08:00
David Adam
e0d7f0bc96 osx/config.h: update to match current configure output on 10.11 2018-12-11 21:59:45 +08:00
David Adam
83fbd881e7 osx/config.h: mirror changes in f2a829aa23
[ci skip]
2018-12-11 21:46:43 +08:00
David Adam
87721049db README: small text improvement
[ci skip]
2018-12-11 21:37:41 +08:00
David Adam
566aa6e78f CHANGELOG: final edits to 3.0b1
Up to 99d56ea2f9
2018-12-11 21:37:12 +08:00
Aaron Gyes
99d56ea2f9 Colorful Ninja error output with Apple's clang
CMake detects the clang that comes with Xcode as AppleClang.
6.0 corresponds to upstream LLVM 3.5svn
2018-12-11 03:53:12 -08:00
Aaron Gyes
0b45b474f3 Update bugreport()
I left this out of the last commit accidentally.
2018-12-11 02:50:03 -08:00
Aaron Gyes
f2a829aa23 Direct people to github to report bugs. 2018-12-11 02:47:34 -08:00
David Adam
f022b4b721 CHANGELOG: further updates toward 3.0b1
Up to eb0539af60.
2018-12-09 21:37:19 +08:00
Fabian Homborg
6d4eb96509 completions/git: Don't use status --ignored=something
Fixes it for git < 2.16.

Fixes #5396.

[ci skip]
2018-12-08 20:51:49 +01:00
Fabian Homborg
88f7d50633 Acquire terminal even if our pgroup is 0
`tcsetpgrp` still works.

[ci skip]

(This isn't tested)
2018-12-08 16:21:52 +01:00
Fabian Homborg
0a0060481f Guard against pgid == 0
This happens in firejail, and it means that we can't use it as an
argument to most pgid-taking functions.

E.g. `wait(0)` means to wait for the _current_ process group,
`tcsetpgrp(0)` doesn't work etc.

So we just stop doing this stuff and hope it works.

Fixes #5295.
2018-12-08 16:21:52 +01:00
Phuurl
46db332be5 Basic umask completion, and minor change to ulimit completion 2018-12-07 17:50:48 +01:00
Fabian Homborg
9cfb1394bf sample_prompts/sorin: Add a safe way to determine merge status
Based on what __fish_git_prompt is doing.

See #5388.

[ci skip]
2018-12-06 16:15:11 +01:00
Leonard Hecker
0b63c1f46d Don't run git merge quietly
This can and will mess up git rebases and force pushes.
2018-12-06 15:53:34 +01:00
David Adam
d40a07436a CHANGELOG: further updates toward 3.0b1 2018-12-06 22:41:22 +08:00
Aaron Gyes
04795eb8ea webconfig: should know about italics, reverse, dim. 2018-12-05 01:05:33 -08:00
Fabian Homborg
03bca5f7dd webconfig: Fall back onto the default colorscheme
The solarized themes now define pager colors, while other schemes
don't.

So if a user picks one of them, and then another, they'd keep the
pager colors.

Instead, since the default theme is now complete, any theme that does
not define its own pager colors will always get the default ones.

[ci skip]
2018-12-05 09:54:31 +01:00
Fabian Homborg
fa5f3fe9a0 webconfig: Update default colorscheme
This was missing a bunch of variables from __fish_config_interactive.

Ideally we wouldn't have to duplicate this info, but I don't have a
great solution either.
2018-12-05 09:54:31 +01:00
ridiculousfish
6f33c0ccb5 Clean up some language and fix bogus escape in complete.fish 2018-12-03 23:14:01 -08:00
ridiculousfish
8521ce4cd2 Clean up complete completions
Closes #5381

Squashed commit of the following:

commit d70e3451ac
Author: TJ Rana <tj.rana@icloud.com>
Date:   Mon Dec 3 14:31:51 2018 -0500

    Update heading

commit ec44e8ed35
Author: TJ Rana <tj.rana@icloud.com>
Date:   Mon Dec 3 14:29:16 2018 -0500

    Update complete.fish

commit a7178ab163
Author: TJ Rana <tj.rana@icloud.com>
Date:   Mon Dec 3 00:46:42 2018 -0500

    Clean up completion descriptions

commit e6134ceeaa
Author: TJ Rana <tj.rana@icloud.com>
Date:   Mon Dec 3 00:26:42 2018 -0500

    Fix grammar

commit 0a805b1016
Author: TJ Rana <tj.rana@icloud.com>
Date:   Mon Dec 3 00:25:34 2018 -0500

    Add option descriptors

commit 608bb02e41
Author: TJ Rana <tj.rana@icloud.com>
Date:   Sun Dec 2 22:47:17 2018 -0500

    Fix spelling

commit 375593fef4
Author: TJ Rana <tj.rana@icloud.com>
Date:   Sun Dec 2 22:46:19 2018 -0500

    Add heading
2018-12-03 23:12:54 -08:00
ridiculousfish
df4a41ff81 Fix a crash with -d5 and block processes 2018-12-02 14:53:26 -08:00
Fabian Homborg
335c41f097 math: Document round
[ci skip]
2018-12-01 23:06:13 +01:00
Fabian Homborg
366c21ca47 parser_keywords: Pre-create "begin" and "else" wcstrings
Otherwise this creates two wcstrings every call.

C++ is silly.
2018-12-01 23:03:41 +01:00
ridiculousfish
5012fb0e36 Add 'round' function to builtin math 2018-12-01 13:25:00 -08:00
Fabian Homborg
1785af156b doc_src/string: Add a small regex reference
This isn't nearly all of
it (https://pcre.org/current/doc/html/pcre2syntax.html), but it should
cover the most-used features.

[ci skip]
2018-12-01 09:54:05 +01:00
Fabian Homborg
d20b3c688b Remove unused portage_print_*_categories functions
These weren't used anywhere, and were only added in
44e2c28255, which isn't in a release yet.

[ci skip]
2018-11-30 21:35:20 +01:00
Fabian Homborg
c242d923c9 sample_prompts/robbyrussell: Use fish_print_hg_root
This removes ~140ms from every single prompt.

When not in a git repo, this prompt now takes ~9ms, as opposed to
~150ms before.

Fixes #5266 harder.

[ci skip]
2018-11-30 20:59:53 +01:00
Fabian Homborg
176c84fb9f Extract code to print hg root from the prompt
This is useful in other prompts, and potentially also to users.

Don't use a dunderscore because we do way too many of them.
2018-11-30 20:57:59 +01:00
Fabian Homborg
60f8eda5c4 webconfig: Hack tmux's reset sequence
This is quite ugly, but in lieu of putting in a proper ansi
parser (i.e. the output part of a terminal), since this is the only
such sequence we have seen until now, let's just match it.

Fixes #5312.

[ci skip]
2018-11-30 20:21:36 +01:00
Fabian Homborg
91a664b9fa webconfig: Use html.escape if available
Just try to import it, on error import the old thing.

Tested with python 3.7.1 and 2.7.15.

Fixes #5125.

[ci skip]
2018-11-30 19:46:00 +01:00
crocket
35db0fb5df Improve the contrast of the pager for solarized dark theme.
By setting fish_pager_color_completion to B3A06D,
the pager gets more visual contrast.
2018-11-30 19:39:45 +01:00
Fabian Homborg
edf95478d9 CHANGELOG: Remove $cmd_duration change
We reverted this again.

[ci skip]
2018-11-30 19:08:29 +01:00
Fabian Homborg
42ec4aa2dd completions/configure: Use first token ending in "configure"
Fixes #5376.

[ci skip]
2018-11-30 11:27:24 +01:00
Fabian Homborg
f0aa63cc11 man: Use new data_dir variable name 2018-11-29 20:28:29 +01:00
Fabian Homborg
eb0dd1ea78 sample_prompts/robbyrussell: Clean
- Remove use of `eval`
- Use `git rev-parse` instead of `git status` as its faster,
- especially in large repos. (in qt5: 600ms vs 1ms)

- Use return status instead of test -n

This should change nothing about the output.
2018-11-29 19:35:13 +01:00
Fabian Homborg
8ee2e54c9b sample_prompts/acidhub: Improve git parsing
Same as the sorin changes - don't parse "git branch" output.
2018-11-29 19:21:07 +01:00