Commit Graph

3586 Commits

Author SHA1 Message Date
ridiculousfish
cb6be2a50d Support for "simple block" optimization, where we can run blocks
directly if there are no arguments or redirections to the block itself
2014-01-07 10:45:36 -08:00
ridiculousfish
45852f0497 Add a convenience method next_node_in_node_list which can be used for
iterating over lists in a parse tree
2014-01-05 15:23:42 -08:00
ridiculousfish
426f58aa61 Merge branch 'master' into ast 2014-01-03 18:12:29 -08:00
ridiculousfish
e0bfa1e422 Merge branch 'fish_config_angular' 2014-01-03 17:54:54 -08:00
ridiculousfish
bf75731bbe Fix for wrong syntax highlighting in the face of tokenizer errors, e.g.
"echo 'hi"
2014-01-03 17:42:25 -08:00
ridiculousfish
c8eec109b2 Support in parse_dump_tree for "forests", which occur when there's a
parse error
2014-01-03 16:54:34 -08:00
ridiculousfish
b8079953d8 Fix for cross-test interference where cancellation from one test would
lead to failure in expansion test
2014-01-03 15:27:39 -08:00
ridiculousfish
993148552e Support for Ctrl-C cancellation in new parser. Added tests for it too. 2014-01-02 16:19:33 -08:00
ridiculousfish
1863be7be4 Fix some warnings 2014-01-01 15:49:41 -08:00
ridiculousfish
358145c4bd Merge branch 'master' into ast 2014-01-01 15:32:50 -08:00
ridiculousfish
fb882f0b69 Support for stack overflow and infinite recursion detection in new
parser
2014-01-01 15:29:56 -08:00
ridiculousfish
27cba56761 Further improvements to error reporting with new parser 2014-01-01 00:04:02 -08:00
ridiculousfish
e2da73bf4f Fix for issue where 'while |' would be incorrectly interpreted as a
"naked statement" causing a wonky error message
2013-12-31 16:38:15 -08:00
ridiculousfish
4402f73bf7 Improve error reporting for tokens ending with newlines 2013-12-31 16:37:15 -08:00
ridiculousfish
7356a0f6c8 Clean up and rationalize error handling in parse_execution.cpp 2013-12-31 14:37:37 -08:00
David Adam
1efb120248 __fish_complete_svn: remove GNU extension options
Continuation of https://github.com/fish-shell/fish-shell/pull/1195/.
Removes use of --delimiter and --fields with cut(1) as these are GNU
extensions.

Note that a number of completions use these options, but as they are
only for GNU/Linux-specific tools have remained unmodified.
2013-12-30 12:32:24 +08:00
Mandeep Sandhu
8078d29fda Fix completion bug for special fish characters.
Issue #1108: If there are special characters like '{' in the
completion suggestions, then we fail to parse it successfully
as we are passing an unescaped version of the character to
parser_t::eval_args(...).

This causes us to retun w/o completion suggestions.

This bug was discovered while implementing 'git stash' completion
as the suggestion contained strings like 'stash@\{0\}'.

Th fix is to properly escape the string before parsing it.
2013-12-30 12:20:44 +08:00
ridiculousfish
a9787b769f Support for implicit cd, no-exec, and the exit builtin. All tests now
pass (!). Error reporting still unsteady.
2013-12-29 16:23:26 -08:00
ridiculousfish
a42711e31c Support for break/continue with new parser execution 2013-12-28 22:52:06 -08:00
ridiculousfish
c632307eaa Make eval_node_at_offset return an error indication instead of the exit
status of the last command
2013-12-28 16:33:26 -08:00
ridiculousfish
0f9de11a67 Fix issues related to redirections and block level IO with new parser 2013-12-28 16:18:38 -08:00
maxried
541db5fbbe Update adb.fish
Added semi-documented but often used adb subcommand.
2013-12-28 12:24:58 +01:00
ridiculousfish
715823a666 Bringup of function definitions, switch statements with new parser 2013-12-27 03:58:42 -08:00
ridiculousfish
6ce4b344e4 Hook up for statements, if statements, and function definition in new
parser
2013-12-27 01:38:43 -08:00
ridiculousfish
a6ca809a4e Fix for issue where last job_list in tree would have a -1 production_idx
because we never actually sent the terminal token type
2013-12-26 14:52:15 -08:00
ridiculousfish
c1a13ae8bc Fix a few errors identified by testing new parser 2013-12-26 13:36:43 -08:00
ridiculousfish
6536ffe178 Facilities for turning on new AST-based parser. 2013-12-26 13:24:10 -08:00
ridiculousfish
562946d055 Cleanup thrashing around in parser_t. New parser execution lives in
parse_execution.cpp
2013-12-26 12:55:10 -08:00
ridiculousfish
924b8cbe24 New ideas about how to use new parser for execution. Beginnings of
implementation.
2013-12-26 12:24:00 -08:00
Derek Li
93f7c14ea6 Math: disable bc multi-line output. 2013-12-26 18:32:36 +01:00
ridiculousfish
5b1a532652 Factor execution aspects from parser_t to parse_execution_context_t .
Still searching for best way to use new parser for execution.
2013-12-24 13:17:24 -08:00
Andreas Eger
a3a918e900 adding elixir, iex, mix completions 2013-12-24 12:43:38 +08:00
ridiculousfish
b6af3e51ab Very early work in adopting new parser for actual execution of commands.
Not turned on yet.
2013-12-23 14:53:56 -08:00
Arjun A.K
3707dcbf33 configure.ac: Fix typo
'direcotry' => 'directory'
2013-12-22 18:28:24 +05:30
ridiculousfish
ebc8bd6ff5 Update the backtrace call to pass a block index instead of a block,
fixing the build
2013-12-20 17:47:07 -08:00
ridiculousfish
ed70195c7e Merge branch 'master' into ast
Conflicts:
	function.cpp
	parser.cpp
	parser.h
2013-12-20 17:44:37 -08:00
ridiculousfish
e38217683c Refactor block_t storage in parser_t from a linked list to a vector 2013-12-20 17:41:21 -08:00
ridiculousfish
739e529416 Initial flailing around trying to adopt new parser for actual execution 2013-12-20 14:37:40 -08:00
Javier Gonel
12be83562d Non standard cut options
Some cut versions don't have `--delimiter` or `--fields` but use the standard options `-d` and `-f`
2013-12-18 18:02:19 +02:00
Mandeep Sandhu
8bcb5e4ed7 Ignore auto-generated file command_list_toc.txt
Added this file to the ignore list (Issue #1192).
2013-12-18 16:59:37 +05:30
Konrad Borowski
5c96bca1ca Revert "Ensure that UTF-8 works if LANG contains it."
This was a really stupid change that I should have tested more
before pushing. It broke any non-interactive usage, such as SSH,
fish config, or parsing the script output, as config.fish is
loaded for everything.

There are no issues with different terminal emulators, so this
change will be pushed in the future, but only running in interactive
mode. I apologize for any issues caused by this commit.

This reverts commit d61adfbc53.
2013-12-17 20:47:14 +01:00
ridiculousfish
384987cd5b Remove detect_errors2 2013-12-16 22:32:08 -08:00
ridiculousfish
af21dfd294 Make the tests compile again 2013-12-16 17:18:32 -08:00
ridiculousfish
3e9153d955 Clean up some error messages. Don't show the line in the error message
if it's the first line and we're interactive, since then it's obvious
2013-12-16 16:52:23 -08:00
ridiculousfish
0e421ea31d Various cleanup and tweaking of backtrace messages 2013-12-16 15:33:20 -08:00
ridiculousfish
471f7f06f7 Fix for a busted assertion 2013-12-15 16:44:05 -08:00
ridiculousfish
ddb37a47da Stop using realpath() in builtin_source, so as to preserve relative path
reporting in backtraces
2013-12-15 16:43:22 -08:00
ridiculousfish
5b24aac266 Initial work on backtrace support with new parser 2013-12-15 16:05:37 -08:00
Konrad Borowski
d61adfbc53 Ensure that UTF-8 works if LANG contains it.
Some people like to have their terminals claim UTF-8 support when
their terminals actually are set to another encoding. As nobody
appears to understand this, I have made a change to automatically
fix the encoding problems if possible. This uses ISO 2022 sequences
in order to dynamically change the encoding.

Fixes #692. Fixes #895. Fixes possible future issues about this.
2013-12-15 11:08:15 +01:00
Konrad Borowski
602f040940 Update Free Software Foundation address.
Fixes #1184.
2013-12-13 21:51:52 +01:00