Commit Graph

176 Commits

Author SHA1 Message Date
ridiculousfish
3cbace98a7 'echo -' should output a dash instead of treating it as options
Fixes #1459
2014-05-16 15:19:07 +08:00
Konrad Borowski
13e1e7e1e9 Fix NULL dereference when function name is not specified
It was possible to type `function ""; end`, and this caused fish to
crash because of NULL pointer.
2014-05-06 12:07:16 +02:00
Konrad Borowski
a7facfb760 Fix memory leak when displaying bind list.
This also removes duplication from the code.
2014-05-01 09:23:23 +02:00
ridiculousfish
4948508277 Squelch some more warnings on Linux 2014-04-27 18:27:34 -07:00
ridiculousfish
58ebdd4a7e Attempt to silence some warnings 2014-04-27 17:23:19 -07:00
ridiculousfish
0d3169ef70 Run restyle.sh to enforce style rules. 2014-03-31 10:01:39 -07:00
ridiculousfish
bd895aa76c Changes to bind_mode implementation based on code review and merge
errors
2014-03-30 16:58:46 -07:00
ridiculousfish
d4fafeb6d6 Merge branch 'master' into 1218_rebase
Conflicts:
	builtin.cpp
	builtin_commandline.cpp
	highlight.cpp
	input.cpp
	input.h
	reader.cpp
	screen.cpp
	screen.h
2014-03-29 14:19:45 -07:00
ridiculousfish
0325c1ba65 Teach parse_util_detect_errors to report invalid builtins, as found in
issue #1252
2014-03-26 18:20:38 -07:00
ridiculousfish
4deb46290d Remove additional dead code from old parser 2014-03-20 21:32:03 -07:00
ridiculousfish
3cfdc6d126 Fix line number reporting in new parser 2014-03-20 21:32:02 -07:00
ridiculousfish
cc12225142 Clean up various block types and state as part of new parser 2014-03-02 13:46:30 -08:00
ridiculousfish
6b3a37c597 Remove obviated builtins and additional cleanup of old parser 2014-03-02 13:11:17 -08:00
ridiculousfish
be33d3f2a4 Revert "Merge pull request #1317 from pullreq/cpp"
This reverts commit 74135c0600, reversing
changes made to 6d749789ce.

See discussion in #1317
2014-02-28 02:16:48 -08:00
Geoff Nixon
18dd6f58e3 Fixes .c -> .cpp in comments. For doxygen. 2014-02-27 06:23:40 -08:00
ridiculousfish
503bbd85b5 Test and fix issue where, if binding X is a prefix of binding Y, and X
is specified before Y, then Y will never be invoked because X will
always get there first. Now instead we order bindings in descending
order by length, so that we always test the binding before any others that
prefixes it. Fixes #1283.
2014-02-12 12:52:31 -08:00
ridiculousfish
e632d39b1f Make if statements always return success at the end, matching other
shells. Fixes #1061.
2014-02-07 17:57:53 -08:00
ridiculousfish
5be3606236 Increased support for completion search field. Use btab (shift-tab) to
complete-and-search.
2014-01-27 00:56:13 -08:00
Julian Aron Prenner
213e907044 Merge remote-tracking branch 'upstream/master' into bind_mode
Conflicts:
	builtin.cpp
	reader.cpp
	share/functions/fish_default_key_bindings.fish
2014-01-15 15:27:06 +01:00
Julian Aron Prenner
fc21bb6eda Replace builtin 'bind_mode' with variable $fish_bind_mode 2014-01-15 12:04:52 +01:00
Julian Aron Prenner
dede320630 Rename 'new-mode' to 'sets-mode', prepare for selection support. 2014-01-15 11:39:19 +01:00
ridiculousfish
53814983ff Update style and formatting to conform to fish style guide. 2014-01-15 01:40:40 -08:00
ridiculousfish
dc8014562b Fix for issue where unterminated quotes would attempt to be executed,
instead of continuing edit onto the next line.
2014-01-14 00:02:18 -08:00
ridiculousfish
096f850433 Eliminate class parse_t 2014-01-12 22:39:12 -08:00
ridiculousfish
ec469782c8 Improvements to error messages with new parser. In particular, "naked
builtins" now print their help (e.g. just 'while')
2014-01-12 15:10:59 -08:00
ridiculousfish
89069fdaa4 Miscellaneous minor fixes based on cppcheck static analyzer 2014-01-12 13:33:35 -08:00
ridiculousfish
d69f408b14 Rename builtin parse to __fish_parse 2014-01-08 15:13:08 -08:00
ridiculousfish
b34721b3f4 Miscellaneous optimizations to reduce string copying 2014-01-07 14:57:58 -08:00
ridiculousfish
fb882f0b69 Support for stack overflow and infinite recursion detection in new
parser
2014-01-01 15:29:56 -08:00
Julian Aron Prenner
dc90cd6bc4 Better input handling; add support multiple binding commands 2014-01-01 00:11:32 +01:00
Julian Aron Prenner
2587649ca2 Allow restricting earsing and listing of bindings to specific mode;
implement force repaint and multi-char bindings;
2013-12-31 14:53:29 +01:00
Julian Aron Prenner
d1faac58dd Implement bind modes 2013-12-31 01:52:41 +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
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
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
e25d49b80b Make builtin_parse output to stdout 2013-12-12 18:17:30 -08:00
ridiculousfish
67b1f14a6f Better support for parse errors in indenting 2013-12-08 14:13:23 -08:00
ridiculousfish
964c7e6f3b Merge branch 'master' into ast
Conflicts:
	complete.cpp
2013-10-27 13:37:14 -07:00
ridiculousfish
cf766b55cc Fix formatting 2013-10-26 15:27:39 -07:00
ridiculousfish
630b0515ad Merge branch 'master' into ast
Conflicts:
	parse_util.cpp
2013-10-16 01:48:21 -07:00
Konrad Borowski
1349d129c5 Fix #213. You can now remove autoloaded functions.
Oddly enough, the code is here, but is internal function.
2013-10-12 21:55:23 +02:00
ridiculousfish
5490f54d00 Make parse_t::parse a static method so we don't have to create lots of
useless parse_t objects
2013-10-12 01:17:55 -07:00
Konrad Borowski
97e731e05c Escape characters in function names. Fixes #1031. 2013-10-09 16:39:24 +02:00
ridiculousfish
a51bd03a5c Remove parse_exec stuff 2013-10-08 18:48:01 -07:00
ridiculousfish
dd91779442 Merge branch 'master' into ast_no_templates
Conflicts:
	configure.ac
	exec.cpp
2013-10-06 13:08:57 -07:00
Alex Charron
061b872498 Refactored builtin_echo with better argument parsing. 2013-09-22 08:53:12 +02:00
Konrad Borowski
5818289c2d Deprecate "." command. Fixes #310.
Needs documentation (for the new name), but manages to move . to source,
while preserving compatibility.
2013-08-14 18:43:09 +03:00
ridiculousfish
e58b73179f More work on new parser 2013-08-11 00:35:00 -07:00