aboutsummaryrefslogtreecommitdiffhomepage
path: root/parse_execution.cpp
Commit message (Collapse)AuthorAge
* Rework error messages to be shorter and to handle more special bash-ismsGravatar ridiculousfish2015-04-29
| | | | | | Example: we can point $* to argv Fixes #1288
* Pass entire argv content to fish_command_not_found recipientsGravatar Roman Hargrave2015-04-19
|
* Modify parser to accept 'begin' without ';'Gravatar Sanne Wouda2015-04-13
| | | | | | | | | | | | Examples that work as expected (even completions don't get confused): $ begin true; end; $ begin if true; end; end $ begin if true; echo hi; end The last example correctly expects another 'end' to match 'begin'. Fixes #1248.
* Fix return value of if/else statements to match POSIX. Hopefully should ↵Gravatar Geoff Nixon2015-03-11
| | | | close #1443, and reverses some of #1061 / e632d39b.
* Ignore user-supplied fd redirections above 2 for builtinsGravatar ridiculousfish2015-01-08
| | | | | Prevents e.g. specifying an fd which corresponds to the history file as the stdin for builtin_source
* Disallow backgrounding in conditionals and before and/or bool statementsGravatar ridiculousfish2014-11-02
| | | | Fixes #1136
* Don't stop job execution on wildcard errorsGravatar Kevin Ballard2014-10-13
| | | | | | | | | | | | | | | | | Wildcard errors are only reported interactively, and they're also not really errors. Commands with multiple wildcards would in fact continue executing if at least one wildcard matched, which is quite surprising. But they would report an error if there is only one wildcard in the arguments list and the wildcard has no match, even if there are other remaining arguments. Given this inconsistency, and given that sh does not stop execution if a wildcard fails to match, it seems better to allow execution to continue. This is better from a scripting perspective anyway, as it means constructs like `set -l paths foo/*.txt` will actually create the variable (with an empty value) instead of skipping the `set` altogether and perhaps causing subsequent code to read or modify a global or universal variable.
* Remove some obsolete job flagsGravatar Kevin Ballard2014-10-13
| | | | These flags were used by the old parser, but not by the new one.
* Suppress wildcard errors in functionsGravatar Kevin Ballard2014-10-13
| | | | | | | | | | | | | Wildcard errors are only supposed to reported when encountered during interactive use. The old parser also suppressed them if `is_block` was true. This was lost in the new parser. However, this also suppresses errors generated from `begin; code_here; end` and other block constructs. Instead, check the parser block stack when we hit an error, and suppress the error if there are any function calls / events / source invocations. These all indicate that the code being executed came from somewhere other than the commandline.
* Standardize unmatched wildcard errorsGravatar Kevin Ballard2014-10-13
| | | | | | | Unmatched wildcard errors during parsing are normally only reported when run interactively. The switch command was unconditionally reporting them anyway (and not setting the status to 124). Fix it so switch goes through the same code path as everything else.
* Don't complain if no errors occurred due to cancellationGravatar ridiculousfish2014-10-06
| | | | Fixes #1166
* Fix for issue where comments are lost in function definitionsGravatar ridiculousfish2014-09-27
| | | | Fixes #1710
* Teach while loops to not hang forever with no-executeGravatar ridiculousfish2014-07-11
| | | | Fixes #1543
* Fix sense of test in parse_execution to issue a barrier if an externalGravatar ridiculousfish2014-07-06
| | | | command has run
* Do not continue execution if argument expansion fails. Fixes #1488Gravatar ridiculousfish2014-05-31
|
* Fix a duplicated variable, and defeat some warnings in fish_testsGravatar ridiculousfish2014-04-27
|
* Set the job property of block_t before expanding arguments associatedGravatar ridiculousfish2014-04-02
| | | | with the job, fixing psub. Fixes #1394
* Run restyle.sh to enforce style rules.Gravatar ridiculousfish2014-03-31
|
* Fix switch statement syntax highlighting so that the arguemnt to switchGravatar ridiculousfish2014-03-28
| | | | | is colored as a parameter, not a command. Promote this from a tok_string to a symbol_argument in the grammar too.
* Fix for crash with malformed switch statement. Fixes #1376Gravatar ridiculousfish2014-03-28
|
* Fix initially backgrounded jobs. Fixes #1373Gravatar ridiculousfish2014-03-28
|
* Merge branch 'master' into parser_cleanupGravatar ridiculousfish2014-03-26
|\ | | | | | | | | | | Conflicts: parse_constants.h parse_tree.h
| * Space and time optimizations for parse_node_t. Reduced size from 48Gravatar ridiculousfish2014-03-25
| | | | | | | | bytes to 20 bytes.
| * Prefer swap() member function to std::swap. We were hitting theGravatar ridiculousfish2014-03-25
| | | | | | | | inefficient generic std::swap for some derived types.
* | Excise use of parser_t's error() functionality. Thread aGravatar ridiculousfish2014-03-21
| | | | | | | | | | | | parse_error_list_t through all of the expand functions, enabling them to report errors more directly. Improve aspects of error reporting for expansion failures.
* | Rewrite parser_t::current_line() to respect new parserGravatar ridiculousfish2014-03-20
| |
* | Fix line number reporting in new parserGravatar ridiculousfish2014-03-20
| |
* | Clean up various block types and state as part of new parserGravatar ridiculousfish2014-03-02
|/
* Implement status -n (line number) with new parserGravatar ridiculousfish2014-03-01
|
* Revert "Merge pull request #1317 from pullreq/cpp"Gravatar ridiculousfish2014-02-28
| | | | | | | This reverts commit 74135c0600d5dcc40d396d0e7293c17b8d4bdaa7, reversing changes made to 6d749789ce240a3e6f1447777db63fd8e7525560. See discussion in #1317
* Fixes .c -> .cpp in comments. For doxygen.Gravatar Geoff Nixon2014-02-27
|
* Dead storesGravatar Geoff Nixon2014-02-27
|
* Expand the variable name as an ordinary parameter in for loops. AddedGravatar ridiculousfish2014-02-21
| | | | test for it too.
* Tweak error reporting in new parser to use fewer linesGravatar ridiculousfish2014-02-17
|
* Reimplement exec parsing. Instead of special-casing exec as a command,Gravatar ridiculousfish2014-02-13
| | | | | | promote it to a decoration (like 'command' or 'builtin'). This makes tab completion and syntax highlighting treat exec's first argument as a command and is otherwise a nice simplification. Fixes #1300
* Tests and fix to allow return to work correctly within if statements. Closes ↵Gravatar ridiculousfish2014-02-12
| | | | #1297.
* Partially rework profiling. Fix profiling crash with new parser. FixesGravatar ridiculousfish2014-02-09
| | | | 1295
* Make if statements always return success at the end, matching otherGravatar ridiculousfish2014-02-07
| | | | shells. Fixes #1061.
* Highlight the entire variable name, not just the dollar sign. Fixes #1201Gravatar ridiculousfish2014-02-03
|
* Update style and formatting to conform to fish style guide.Gravatar ridiculousfish2014-01-15
|
* Further cleanup and improvements to error messagesGravatar ridiculousfish2014-01-13
|
* Added tests for piping an fd other than stdoutGravatar ridiculousfish2014-01-13
|
* Include missing algorithm header in parse_execution.cppGravatar ridiculousfish2014-01-12
|
* Improvements to error reporting. In particular, we now append a newlineGravatar ridiculousfish2014-01-08
| | | | | | in reader_shell_test, so that there's always a statement terminator. Otherwise commands like 'echo |' would not be considered an error (just incomplete).
* Miscellaneous optimizations to reduce string copyingGravatar ridiculousfish2014-01-07
|
* Support for "simple block" optimization, where we can run blocksGravatar ridiculousfish2014-01-07
| | | | directly if there are no arguments or redirections to the block itself
* Add a convenience method next_node_in_node_list which can be used forGravatar ridiculousfish2014-01-05
| | | | iterating over lists in a parse tree
* Support for Ctrl-C cancellation in new parser. Added tests for it too.Gravatar ridiculousfish2014-01-02
|
* Support for stack overflow and infinite recursion detection in newGravatar ridiculousfish2014-01-01
| | | | parser
* Further improvements to error reporting with new parserGravatar ridiculousfish2014-01-01
|