aboutsummaryrefslogtreecommitdiffhomepage
path: root/builtin.cpp
Commit message (Collapse)AuthorAge
* Teach fish how to push and pop blocks even in the face of no_exec. All tests ↵Gravatar ridiculousfish2013-03-25
| | | | | | finally pass. https://github.com/fish-shell/fish-shell/issues/624
* Initial version of printf builtinGravatar Siteshwar Vashisht2013-03-02
|
* First round of fixes based on cppcheckGravatar ridiculousfish2013-02-16
| | | | https://github.com/fish-shell/fish-shell/issues/575
* First stab at builtin set_color. Moved set_color.cpp to ↵Gravatar ridiculousfish2013-02-14
| | | | builtin_set_color.cpp and taught fish about it.
* merge branch 'bug-537' and branch 'bug-read-ctrlC'. This should fix both ↵Gravatar Jan Kanis2013-02-05
|\ | | | | | | #537 and #516
* | Make subcommands modify $status, and make builtin_set not modify status ↵Gravatar ridiculousfish2013-01-31
| | | | | | | | | | | | | | unless it fails https://github.com/fish-shell/fish-shell/issues/547 https://github.com/fish-shell/fish-shell/issues/214
| * rename reader_data_t.interruptible to exit_on_interruptGravatar Jan Kanis2013-01-22
| |
| * make the `read` builtin respect ctrl-CGravatar Jan Kanis2013-01-20
|/
* Rearrange some variables for possibly better alignment. int -> boolGravatar ridiculousfish2013-01-19
|
* Implement builtin [ via builtin testGravatar ridiculousfish2013-01-05
|
* Make event_block_t.event not a referenceGravatar ridiculousfish2012-12-22
| | | | Stylistic tweaks
* FormattingGravatar ridiculousfish2012-12-22
|
* Merge branch 'event-bug-test' of git://github.com/JanKanis/fish-shell into ↵Gravatar ridiculousfish2012-12-22
|\ | | | | | | JanKanis-event-bug-test
| * include fixes and suggestions from code reviewGravatar Jan Kanis2012-12-22
| |
* | Make echo recognize -neGravatar ridiculousfish2012-12-20
| |
* | Changes to work recognition per ↵Gravatar ridiculousfish2012-12-20
| | | | | | | | | | | | | | https://github.com/fish-shell/fish-shell/issues/384 Word movement should be very similar to fish 1.x backward-kill-word remains more liberal, but now stops at any of {,'"=}
| * reference'ize event.cpp/hGravatar Jan Kanis2012-12-20
| |
| * Allow 'emit' to accept event argumentsGravatar Jan Kanis2012-12-20
| |
* | Eliminate str2wcsGravatar ridiculousfish2012-12-19
| |
* | Random fixes to comments.Gravatar Cheer Xiao2012-12-16
|/
* forward-word should accept a word of an autosuggestionGravatar ridiculousfish2012-12-10
| | | | https://github.com/fish-shell/fish-shell/issues/435
* Make tok_first return a wcstring instead of a wchar_t*Gravatar ridiculousfish2012-11-21
|
* Fix indentation of switch statementsGravatar ridiculousfish2012-11-19
|
* Apply new indentation, brace, and whitespace styleGravatar ridiculousfish2012-11-18
|
* Don't autosuggest in builtin_readGravatar ridiculousfish2012-11-18
| | | | https://github.com/fish-shell/fish-shell/issues/29
* Support for fish_right_promptGravatar ridiculousfish2012-11-07
| | | | Fixes https://github.com/fish-shell/fish-shell/issues/80
* Simplify handling of escape sequences in echo -eGravatar ridiculousfish2012-10-17
|
* Make the \c special character in echo suppress the newline tooGravatar ridiculousfish2012-10-17
|
* Implement -e option to echo (to interpret special characters), and -E to not ↵Gravatar ridiculousfish2012-10-17
| | | | | | interpret them https://github.com/fish-shell/fish-shell/issues/337
* Don't barf when ending a FAKE blockGravatar Ian Munsie2012-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After updating, fish would immediately die when started in an xterm from my window manager (wmii) with a message like: fish: builtin.cpp:3357: int builtin_end(parser_t&, wchar_t**): Assertion `false' failed. fish: Job 1, “~/code/fish-shell/fish” terminated by signal SIGABRT (Abort) Starting fish from an existing shell worked, and running it on other machines that I was only SSHing into worked as well. I did discover that on one machine starting git from one specific directory (/home/ian/bml/kernel) would cause this failure, but starting from any other directory worked as normal. I'm not entirely sure what circumstances contribute to this failure - starting from a copy of the kernel directory works fine. The failure only started with the following commit, which introduced the assert(false): commit d788c844408d25eb5f986d8c6e2b609270dbc153 Made type property of block_t constant and private Further work towards cleaning up block_t hierarchy Looking at this fail in gdb: (gdb) r Starting program: /home/ian/code/fish-shell/fish [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". fish: builtin.cpp:3357: int builtin_end(parser_t&, wchar_t**): Assertion `false' failed. Program received signal SIGABRT, Aborted. 0x00007ffff6c82475 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 64 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt function=0x548520 "int builtin_end(parser_t&, wchar_t**)") at assert.c:81 (gdb) up 3 3357 assert(false); //should never get here (gdb) p parser.current_block->type() $1 = FAKE So this happens when we run an end command for a FAKE block. The below patch adds an empty case for FAKE blocks to avoid hitting the assert. I would need to study the code in more detail to understand if we should even be executing this code if we are in a FAKE block, but this patch seems to solve the issue for me. Signed-off-by: Ian Munsie <darkstarsword@gmail.com>
* Changed "elseif" to "else if"Gravatar ridiculousfish2012-09-03
|
* Clean up some warnings and some unused if-related codeGravatar ridiculousfish2012-09-01
|
* First stab at elseif implementationGravatar ridiculousfish2012-09-01
|
* Migrated function_data_t out of base block classGravatar ridiculousfish2012-08-26
| | | | Removed an auto_ptr (yay)
* Made type property of block_t constant and privateGravatar ridiculousfish2012-08-26
| | | | Further work towards cleaning up block_t hierarchy
* First stab at getting rid of the ugly state1, state2 properties of block_tGravatar ridiculousfish2012-08-26
|
* Adopt posix_spawn (!)Gravatar ridiculousfish2012-08-15
| | | | | Rewrite IO chains to be a vector of pointers, instead of a linked list Removed io_transmogrify
* Additional warnings cleanup, effective C++ violations, dead code removalGravatar ridiculousfish2012-08-05
|
* Cleaned up lots of typecasts, simplified some string handlingGravatar ridiculousfish2012-08-04
|
* Additional warning cleanup and switching from int to size_t where appropriateGravatar ridiculousfish2012-08-04
|
* Lots of work towards making fish build without warnings on Mountain Lion, ↵Gravatar ridiculousfish2012-08-04
| | | | mostly in terms of using size_t instead of int
* Implemented history deletion from fish_configGravatar ridiculousfish2012-07-27
| | | | Fixes https://github.com/fish-shell/fish-shell/issues/250
* Switch from std::list to std::vector in a few places to reduce compiled code ↵Gravatar ridiculousfish2012-07-24
| | | | size
* Lots of miscellaneous cleanup. Unified the path_get_cd_path, ↵Gravatar ridiculousfish2012-07-20
| | | | path_allocate_cd_path, etc. functions
* Allow 'contains' builtin to return indexGravatar maxfl2012-07-10
| | | | | Add an option -i/--index to the contains builtin to print the index of first coincidence.
* Fix read default prompt. It's now single line.Gravatar maxfl2012-07-06
|
* Fixed case behaviourGravatar maxfl2012-07-05
| | | | | | | | | | | | | | | | | | | | | * case no properly handles -h and --help flags, i.e. treats it as pattern * fixed case escaping: The following expressions now work correctly: switch '*' echo '*' echo Match any string end switch '*' echo '\*' echo Match asterix end switch '\\' echo '\\\\' echo Match slash end The same for '?' sign
* Clarify the function name deferral in functions_defGravatar ridiculousfish2012-07-01
| | | | Prohibit making a function with an empty name
* Update funcedGravatar maxfl2012-07-01
| | | | | | | | | | | | | * Editor mode is no the default * Use -i or --interactive or -e fish to edit function in interactive mode * tmpname is now created with random number added and check that file do not already exist * check $TMPDIR existence and put /tmp if it does not exist * There is an undocumented feature to use functions, started with dash. Introduce necessary changes to funced, functions, def_function() in order to make it work properly. * Delete editor guessing. Use $EDITOR variable or -e key
* Don't blow away $status in switch statementsGravatar Kevin Ballard2012-06-24
| | | | | Tweak the switch and case builtins to not blow away $status inappropriately. Fixes issue #161.