Commit Graph

8048 Commits

Author SHA1 Message Date
ridiculousfish
234808bc32 [muparser] ApplyRemainingOprt to return explicit errors 2017-12-18 23:01:16 -08:00
ridiculousfish
60d9c9fa00 [muparser] More functions to return errors
Return OptionalError for more functions, allowing for explicit error
handling.
2017-12-18 23:01:16 -08:00
ridiculousfish
d97bb3425f [muparser] Clean up ParserTokenReader constructor 2017-12-18 23:01:16 -08:00
ridiculousfish
83799832bc [muparser] Make ParserTokenReader non-copyable
There's no reason to copy these.
2017-12-18 23:01:16 -08:00
ridiculousfish
3b1b5b30ca [muparser] Clean up ParserToken::GetFuncAddr 2017-12-18 23:01:16 -08:00
ridiculousfish
c4c89dff4e [muparser] Clean up ParserCallback interface
Remove Clone() method and mark some functions as defaulted.
2017-12-18 23:01:15 -08:00
ridiculousfish
9443a4bf2d [muparser] Remove copy and assignment
There is no reason for muParsers to be copyable or assignable.
Also remove some dead code and switch an auto_ptr to unique_ptr.
2017-12-18 23:01:15 -08:00
ridiculousfish
65f4963542 [muparser] Eliminate MUP_FAIL and MUP_ASSERT
Replace MUP_ASSERT with assert(). MUP_FAIL was unused.
2017-12-18 23:01:15 -08:00
ridiculousfish
f05b55c84c [muparser] Remove \throw nothrow comments
Soon it will all be nothrow!
2017-12-18 23:01:15 -08:00
ridiculousfish
9649b132bd [muparser] Continue adopting ValueOrError 2017-12-18 23:01:15 -08:00
ridiculousfish
bfd70880a5 [muparser] Begin adopting ValueOrError
Switch custom function types to return ValueOrError, which will
enable us to remove exceptions.
2017-12-18 23:01:15 -08:00
ridiculousfish
5655f255ef [muparser] Add a muParser ValueOrError type
First steps towards removing exceptions from muParser.
2017-12-18 23:01:15 -08:00
ridiculousfish
c0af4ba70a [muparser] Fix "backslash and newline separated by space" warning
ASCII art is serious business.
2017-12-18 23:01:15 -08:00
ridiculousfish
fc110d2c0e [muparser] Fix "enumeration value not handled in switch" warning
It's unclear whether the default behavior is ever executed. Add an
assertion to find out the hard way.
2017-12-18 23:01:15 -08:00
ridiculousfish
a7f6105497 [muparser] Remove the optimizer
The optimizer adds a fair amount of complexity in muparser with no
benefit to fish, since fish is not going to use complicated expressions
or cache parsed expressions.
2017-12-18 23:01:15 -08:00
ridiculousfish
85334432ed [muparser] Remove cmFUNC_BULK
fish does not need bulk functions, which are used to enable parallel
computations.
2017-12-18 23:01:15 -08:00
ridiculousfish
c5a0c58cfb [muparser] Remove NDEBUG from its autoconf build
Ensure that assertions are tripped.
2017-12-18 11:58:14 -08:00
ridiculousfish
dac13d51fa [muparser] Switch autoconf build to C++11
This will enable testing via muparser's test suite while
incorporating C++11 features.
2017-12-18 11:58:14 -08:00
ridiculousfish
38a2e0218d [muparser] Remove muParserError.h
To help remove exception handling, we will need to have a type that
has visibility into both ParserError and value_type. We're going to
put this type in muParserDef.h. Remove the error header and fold its
contents into muParserDef.h.
2017-12-18 11:58:14 -08:00
ridiculousfish
5f7f1102db [muparser] Remove ParserErrorMsg
This was a class to "manage" error messages. Remove it and replace
it with a function.
2017-12-18 11:58:14 -08:00
ridiculousfish
cad9bbd2a2 [muparser] Remove muParserStack.h
This was a silly data structure that didn't carry its weight.
Replace it with a wrapper around std::vector that doesn't explicitly
throw exceptions. It's unclear if muparser relied on the exception
throwing behavior of ParserStack, and it seems there's no way to find
out except removing it and seeing what breaks.

The tests pass for what that's worth!
2017-12-18 11:58:13 -08:00
ridiculousfish
e2b798cda3 [muparser] Restyle muparser sources to match fish
Add muparser soruces to style.fish, and run it to make muparser
match fish style guidelines.
2017-12-18 11:58:13 -08:00
ridiculousfish
b39d0adc39 Add muparser example executable to .gitignore 2017-12-18 11:58:13 -08:00
ridiculousfish
8364e59709 [muparser] Remove MUP_USE_OPENMP
We are not using OpenMP in the fish shell.
2017-12-18 11:58:13 -08:00
ridiculousfish
483930946b [muParser] Remove ecINTERNAL_ERROR
Internal errors should not be represented as exceptions, but
instead as assertion failures.
2017-12-18 11:58:13 -08:00
Fabian Homborg
edcf9ebc12 [git completions] Remove staged_files function
Turns out "__fish_git_staged_files" does the same thing as "__fish_git_modified_files --staged".

Also use "--staged" instead of "--cached", which is a more
understandable synonym.

Many thanks to @thomcc on gitter.
2017-12-18 20:05:56 +01:00
David Adam
3a10e76874 CHANGELOG: drop bare variable note
This behaviour was never in a released version.

[ci skip]
2017-12-18 21:06:32 +08:00
ridiculousfish
81dd4a4536 [math] Remove more bare variable support
Prior to this fix, a "bare variable" in math like 'x + 1' would be
looked up in the environment, i.e. equivalent to '$x + 1'. This appears
to have been done for performance. However this breaks the orthogonality
of fish; performance is not a sufficient justification to give math this
level of built-in power, especially because the performance of math is
not a bottleneck. The implementation is also ugly.

Remove this feature so that variables must be prefixed with the dollar
sign and undergo normal variable expansion. Reading 'git grep' output
does not show any uses of this in fish functions or completions.

Also added to changelog.

Fixes #4393
2017-12-17 12:40:09 -08:00
Fabian Homborg
4553a74933 Clarify CHANGELOG RE bracketed paste and iTerm 2017-12-17 21:35:35 +01:00
Niraj Thapaliya
0c2d939e02 yarn run tab completion
completes #4597
2017-12-14 22:58:08 -06:00
Niraj Thapaliya
7cd9c3b2bf Clean trailing whitespace 2017-12-14 22:09:53 -06:00
David Adam
834f344f1d build_documentation: postprocess regular expression uses command name
The previous regular expression only matched the `abbr` text and was
used in testing.
2017-12-15 09:53:15 +08:00
David Adam
69342066f4 build_documentation: reduce unnecessary copying, sed and perl
This saves about a second, which is not a lot, but dropping the build
dependency on perl is helpful.
2017-12-14 22:54:08 +08:00
Fabian Homborg
4ca9953114 Skip unusable paths in __fish_print_hostnames
See
https://github.com/fish-shell/fish-shell/issues/4511#issuecomment-343022740.

This would try to `cd` to ~/.ssh even if it didn't exist. That's
clearly bogus.
2017-12-13 13:18:25 +01:00
Alan Somers
8fb6d5db3b Fix the build on FreeBSD ARM and ARM64 (#4593)
Downstream bug:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224254

Fixes #4589
2017-12-12 22:45:17 -08:00
PenegalECI
0f587320ed Added translations for mdadm completions (#4587) 2017-12-12 22:24:02 +01:00
Ron Gebauer
7aaf897a72 Add modified completion for git diff (#4592)
* Add modified completion for git diff

* Add modified completion for git diff
2017-12-12 22:16:43 +01:00
Aaron Bieber
75e17e007d add signify completions for OpenBSD 2017-12-12 19:19:09 +01:00
Aaron Bieber
37c7950a3f add vmctl completions for OpenBSD 2017-12-12 19:19:05 +01:00
Aaron Bieber
eec47a173d add rcctl completions for OpenBSD 2017-12-12 19:19:01 +01:00
Aaron Bieber
e135024cc4 add pkg_info completions for OpenBSD 2017-12-12 19:19:01 +01:00
Aaron Bieber
e57f5cc99b add pkg_delete completions for OpenBSD 2017-12-12 19:19:01 +01:00
Aaron Bieber
8bfd3fa144 add pkg_add completions for OpenBSD 2017-12-12 19:19:01 +01:00
Aaron Bieber
53e08cd0d6 add OpenBSD pfctl completion 2017-12-12 19:18:57 +01:00
Aaron Bieber
bfd2885279 add package parsing for OpenBSD 2017-12-12 19:18:53 +01:00
Aaron Bieber
440df37b41 parse *BSD interface names 2017-12-12 19:18:53 +01:00
Aaron Bieber
db0ff0bcde Add generic parser for /etc/man.conf
- Also rename get_paths_from_manpath() to get_paths_from_man_locations()
2017-12-12 19:18:47 +01:00
Aaron Bieber
277cd30520 add ffs to known filesystems 2017-12-12 19:18:47 +01:00
Mohammad Ali Alfarra
ba04c2af3d Add exercism completion 2017-12-11 10:44:06 +01:00
Johan Walles
0e9d52bc41 [Informative VCS Prompt] Print failing exit codes
Before this change, if a command failed, this was indicated by the "$"
at the end of the prompt turning red.

With this change in place, if a command fails, the exit code of the
failing command is displayed in [square brackets].
2017-12-11 10:35:21 +01:00