aboutsummaryrefslogtreecommitdiffhomepage
path: root/builtin.cpp
Commit message (Collapse)AuthorAge
* Align `fg` and `bg` commands: With no parameters `fg` prints the help.Gravatar Andreas Heiduk2014-11-07
| | | | `bg` on the other hand only prints `no job`. Now both print `no job`.
* Make C_ (gettext used in completions) return wcstringGravatar ridiculousfish2014-10-30
|
* A little extra tweaking so builtin_print_help looks betterGravatar Kevin Ballard2014-10-10
| | | | | | | The terminal width magic that __fish_print_help learned doesn't help when builtin_print_help runs it in a subshell. Instead, add an undocumented --tty-width flag to __fish_print_help that's used to pass the terminal width.
* Add new `functions` flag -V/--inherit-variableGravatar Kevin Ballard2014-10-02
| | | | | | | | | | --inherit-variable takes a variable name and snapshots its current value. When the function is executed, it will have a local variable with this value already defined. Printing the function source will include synthesized `set -l` lines for the values. This is primarily useful for functions that are created on the fly, such as in `psub`.
* Make false/true into builtinsGravatar Kevin Ballard2014-09-29
| | | | | | | Making `true` into a builtin is a significant optimization to `while true` loops. As long as `true` is a builtin, we may as well make `false` builtin as well (despite the fact that it's not typically executed in a loop).
* Remove dead code in history builtin.Gravatar Konrad Borowski2014-09-24
|
* Support `bind SEQ` to print a binding for `SEQ`Gravatar Kevin Ballard2014-09-22
|
* Rework mode handling of `bind`Gravatar Kevin Ballard2014-09-22
| | | | | | | | | | | | | Binds with the same sequence in multiple modes was not working right. Fix up the implementation to propagate modes everywhere as necessary. This means that `bind` will properly list distinct binds with the same sequence, and `bind -e` will take mode into account properly as well. Note that `bind -e seq` now assumes the bind is in the default bind mode, whereas before it would erase the first binding with that sequence regardless of mode. `bind -e -a` still erases all binds in all modes, though `bind -M mode -e -a` still only erases all binds in the selected mode.
* Fix `bind -e` without `-k`Gravatar Kevin Ballard2014-09-22
| | | | | In adding `-k` support to `bind -e` I broke the ability to use `bind -e` without specifyign `-k`. Oops.
* Support -k with `bind -e`Gravatar Kevin Ballard2014-09-22
| | | | Also return an exit code of 1 if `bind -k` can't match the key name.
* Show -M and -m flags in bind listGravatar Kevin Ballard2014-09-22
|
* Don't suppress output for `printf --help`Gravatar Kevin Ballard2014-09-21
| | | | Fixes #746.
* Add --right-prompt flag to readGravatar Kevin Ballard2014-09-21
| | | | | | | Add a flag to read to allow for setting the right prompt command in addition to the existing support for setting the prompt command. Fixes #1698.
* No need for mbstate_t to be staticGravatar Kevin Ballard2014-09-21
|
* Fix incorrect error on `read` with 1-character inputGravatar Kevin Ballard2014-09-21
| | | | | | When `read` is given a single character of input (including the newline), it was bailing as if it had been given no input. This is incorrect.
* Implement new `read --null` flagGravatar Kevin Ballard2014-09-21
| | | | | | | | The `--null` flag to `read` makes it split incoming lines on NUL instead of newlines. This is intended for processing the output of a command that uses NUL separators (such as `find -print0`). Fixes #1694.
* Add missing newline after `bind -k foo` error messageGravatar Kevin Ballard2014-09-08
|
* New -n option for read builtinGravatar Joseph Tannhuber2014-09-03
| | | | | Usage: read -n nchars Reads maximum of nchars characters. If nchars <= 0, there's no limit.
* Fix the compilation under gcc 4.9.0.Gravatar Konrad Borowski2014-08-22
| | | | | | | | gcc interpretes C99's compound literals more strictly by invalid the compound literal on implicit to pointer cast (because of automatic storage duration, 6.5.2.5.6 in C99 standard draft). This fixes the issue by not using compound literals at all.
* Merge branch 'make_type_better' of github.com:kballard/fish-shell into ↵Gravatar ridiculousfish2014-08-21
|\ | | | | | | kballard-make_type_better
* | Support for command wrapping ("aliases")Gravatar ridiculousfish2014-08-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the --wraps option to 'complete' and 'function'. This allows a command to (recursively) inherit the completions of a wrapped command. Fixes #393. When evaluating a completion, we inspect the entire "wrap chain" for a command, i.e. we follow the sequence of wrapping until we either hit a loop (which we silently ignore) or the end of the chain. We then evaluate completions as if the wrapping command were substituted with the wrapped command. Currently this only works for commands, i.e. 'complete --command gco --wraps git\ checkout' won't work (that would seem to encroaching on abbreviations anyways). It might be useful to show an error message for that case. The commandline builtin reflects the commandline with the wrapped command substituted in, so e.g. git completions (which inspect the command line) will just work. This sort of command line munging is also performed by 'complete -C' so it's not totally without precedent. 'alias will also now mark its generated function as wrapping the 'target.
* | Clean up reader_write_title to work with wcstringGravatar ridiculousfish2014-08-02
| |
* | add command line string as $argv[1] for fish_titleGravatar jianjun2014-08-02
| |
* | Improve history robustness against corrupt filesGravatar ridiculousfish2014-07-29
| | | | | | | | Fixes #1581
* | Add support for history --merge to incorporate history changes fromGravatar ridiculousfish2014-07-25
| | | | | | | | | | | | other sessions. Fixes #825
| * read: Support arrays, character splittingGravatar Kevin Ballard2014-07-14
| | | | | | | | | | | | | | | | | | | | Enhance the `read` builtin to support creating an array with the --array flag. With --array, only a single variable name is allowed and the entire input is tokenized and placed into that variable as an array. Also add custom behavior if IFS is empty or unset. In that event, split the input on every character, instead of the previous behavior of doing no splitting at all.
| * command: Rename -p/--path flag to -s/--searchGravatar Kevin Ballard2014-07-13
| |
| * Teach `command` builtin a -p/--path flagGravatar Kevin Ballard2014-07-13
|/ | | | | Give the `command` builtin a single flag, -p/--path, that causes it to print the full path that would be executed for the given command.
* Fix segfault in status builtinGravatar xzfc2014-07-14
|
* bind should not show -k for bindings that are escape sequences, not keysGravatar ridiculousfish2014-07-07
|
* 'echo -' should output a dash instead of treating it as optionsGravatar ridiculousfish2014-05-16
| | | | Fixes #1459
* Fix NULL dereference when function name is not specifiedGravatar Konrad Borowski2014-05-06
| | | | | It was possible to type `function ""; end`, and this caused fish to crash because of NULL pointer.
* Fix memory leak when displaying bind list.Gravatar Konrad Borowski2014-05-01
| | | | This also removes duplication from the code.
* Squelch some more warnings on LinuxGravatar ridiculousfish2014-04-27
|
* Attempt to silence some warningsGravatar ridiculousfish2014-04-27
|
* Run restyle.sh to enforce style rules.Gravatar ridiculousfish2014-03-31
|
* Changes to bind_mode implementation based on code review and mergeGravatar ridiculousfish2014-03-30
| | | | errors
* Merge branch 'master' into 1218_rebaseGravatar ridiculousfish2014-03-29
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: builtin.cpp builtin_commandline.cpp highlight.cpp input.cpp input.h reader.cpp screen.cpp screen.h
| * Teach parse_util_detect_errors to report invalid builtins, as found inGravatar ridiculousfish2014-03-26
| | | | | | | | issue #1252
| * Remove additional dead code from old 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
| |
| * Remove obviated builtins and additional cleanup of old parserGravatar ridiculousfish2014-03-02
| |
| * 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
| |
| * Test and fix issue where, if binding X is a prefix of binding Y, and XGravatar ridiculousfish2014-02-12
| | | | | | | | | | | | | | 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.
| * Make if statements always return success at the end, matching otherGravatar ridiculousfish2014-02-07
| | | | | | | | shells. Fixes #1061.
| * Increased support for completion search field. Use btab (shift-tab) toGravatar ridiculousfish2014-01-27
| | | | | | | | complete-and-search.
* | Merge remote-tracking branch 'upstream/master' into bind_modeGravatar Julian Aron Prenner2014-01-15
|\| | | | | | | | | | | | | Conflicts: builtin.cpp reader.cpp share/functions/fish_default_key_bindings.fish
* | Replace builtin 'bind_mode' with variable $fish_bind_modeGravatar Julian Aron Prenner2014-01-15
| |