aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions
Commit message (Collapse)AuthorAge
* Don't define unnamespaced internal function.Gravatar Konrad Borowski2015-01-17
|
* Fix: eval should preserve previous $status if the evaluated block does not ↵Gravatar Jorge Bucaran2015-01-17
| | | | | | change it Empty functions may return 1 when eval is used due to the $status not being correctly preserved inside the function definition.
* Add more expository comments to eval, and remove a useless parameterGravatar ridiculousfish2015-01-07
|
* Change fish_paginate to paginate both stdout and stderr.Gravatar Andreas Heiduk2014-12-28
|
* Support nixos command-not-found handlerGravatar Max Gonzih2014-12-22
|
* Added `export` alias for set global variable, made for sh/bash/zsh compatibilityGravatar Rack Lin2014-12-01
| | | | | Signed-off-by: Rack Lin <racklin@gmail.com> Signed-off-by: David Adam <zanchey@ucc.gu.uwa.edu.au>
* Update various strings for translation, avoid _ for non-translationsGravatar David Adam2014-11-25
| | | | | Use __ instead of _ as a placeholder for ignored variables in `read` statements.
* grep.fish: don't set GREP_COLORGravatar David Adam2014-11-25
| | | | | | grep will fall back to the default colors. Closes #1316.
* grep.fish: don't use GREP_OPTIONS as it is deprecatedGravatar David Adam2014-11-25
| | | | Closes #1825.
* __fish_config_interactive: send CWD via escapes in Apple TerminalGravatar David Adam2014-11-20
| | | | Closes #68.
* __fish_urlencode: rework to behave properly on BSD/OS XGravatar David Adam2014-11-20
| | | | Work on #68.
* abbr.fish: escape the output of abbr --showGravatar David Adam2014-11-16
| | | | | | | Allows abbreviations containing embedded newlines, etc., to be displayed and exported properly. Work on #731.
* abbr.fish: improve support for corner casesGravatar David Adam2014-11-16
| | | | | | | Handle unusual cases ('=abc', ' =abc') better - regression from 8e8e6314due to a7bab7b. Work on #731.
* abbr/web_config: support space-delimited abbreviationsGravatar David Adam2014-11-15
| | | | | | | | | Support for space-delimited abbreviations was added to the expansion parser in fbade198; this commit extends that support to the user-facing tools, and documents the space-separated behaviour. Equals-delimited abbreviations are expected to be removed before the next release. Work on #731.
* __fish_print_packages: add support for zypperGravatar David Adam2014-11-13
| | | | Closes #1787.
* __fish_systemctl_*: use systemctl to generate the list of unitsGravatar David Adam2014-11-10
| | | | | | Closes #1804. Note that if systemd is not running, the completion will fail.
* Clean up vared error message outputGravatar ridiculousfish2014-11-09
| | | | Fixes #1323
* Remove pre-1.22 migration support in fish_config_interactiveGravatar ridiculousfish2014-11-09
| | | | | This removes some gnarly and probably broken code that attempts to upgrade from fish 1.21 to fish 1.22. Fixes #1714.
* vi bindings: add CTRL-C handler in default modeGravatar Jared Grubb2014-10-31
| | | | | | There is no CTRL-C handler for the default mode in the vi bindings. This makes it difficult to say "never mind" and start a new command line like you can do in bash's vi mode. There were CTRL-C handlers for insert and visual modes that go back to default mode, but nothing happens in default mode. I copy-pasted the CTRL-C handler from the default key bindings file.
* history: put the output through the pager in interactive modeGravatar David Adam2014-10-26
| | | | | | | | (Ideally, the behaviour of git could be implemented: pipe the input through a pager iff the length is > window size and in interactive mode). Closes #1076.
* prompt_pwd: Use tilde expansion to get real full home pathGravatar David Adam2014-10-26
| | | | Closes #1133.
* Allow funced to retry on errorGravatar ridiculousfish2014-10-17
| | | | Fixes #1371
* ls: find and use various dircolors initialisation files, if they existGravatar David Adam2014-10-17
| | | | Closes #1758.
* 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.
* Rewrite __fish_print_help to produce better resultsGravatar Kevin Ballard2014-10-09
| | | | | | | | | | | | As a result of this rewrite, the output now: * Expands to fit the terminal width, like `man` does * Preprocesses the manpage with `tbl` just in case, since `man` does this, even though I doubt any fish manpages use `tbl` formatting. * Handle bold/underline with the `ul` command as it was designed for instead of trying to fake it with `sed`. * Compresses blank lines as `man` does with the default `less -is` pager.
* Support -h/--help with `eval`Gravatar Kevin Ballard2014-10-09
| | | | | | `eval` prints help if given a single argument of -h or --help. Fixes #1379.
* Rewrite `abbr` functionGravatar Kevin Ballard2014-10-07
| | | | | | | | | | | | The usage is still the same, but it's a lot more robust, and also no longer assumes $fish_user_abbreviations must be a universal variable. This also fixes the unexpected error output when calling `abbr -a` with no existing abbreviations. Calling `abbr -a` with an abbreviation that already exists now silently overwrites the abbreviation, just like `function` and `bind` do, instead of complaining.
* abbr.fish: add abbr, a command to manipulate abbreviationsGravatar David Adam2014-10-05
| | | | Work on #731.
* Clean up prompt_pwd with the new function -V flagGravatar Kevin Ballard2014-10-02
| | | | Also fixes `cd /private` displaying as no path on OS X.
* Update psub for the new --inherit-variable flagGravatar Kevin Ballard2014-10-02
| | | | | Also do some minor formatting cleanup, make psub return 1 when executed outside of a command substitution, and make it respect $TMPDIR.
* # This is a combination of 2 commits.Gravatar Kevin Ballard2014-10-02
| | | | | | | | | | # The first commit's message is: Simplify default fish_prompt No need for the set_color caching now that it's a builtin. Also simplify the 3 classic prompts in fish_config's sample_prompts set.
* Minor tweaks to initial keybinding loadGravatar Kevin Ballard2014-10-02
| | | | | | | Remove comment that AFAICT is not true anymore. Ensure someone setting __fish_active_key_bindings as a universal variable doesn't screw up the initial keybinding load.
* Manpage completions: store in $XDG_DATA_HOMEGravatar David Adam2014-09-29
| | | | Closes #1343, works towards #1257.
* __fish_print_hostnames: use awk to process ssh_config filesGravatar David Adam2014-09-29
| | | | | | Uses awk rather than sed to account for multiple formatting options. Closes #1260.
* __fish_complete_path: add new completion, mimics builtin path completionGravatar David Adam2014-09-29
| | | | | | | Completions can now be written which disable file completion and then selectively re-enable it using this function. Closes #834.
* Add Meta+H as keybinding for man page.Gravatar Konrad Borowski2014-09-28
| | | | | | | | Apparently, in zsh, Meta+H can be used to display the manpage for the current command. This commit adds this zsh feature to fish shell. The F1 keybinding is left, although it's now secondary according to fish help, as some terminal emulators don't let the user press F1 key.
* Revert "math.fish: support floating-point maths"Gravatar David Adam2014-09-27
| | | | | | | | | This reverts commit 7cad0069e8f4a652d0e22f1b0198f67399e80157. https://github.com/fish-shell/fish-shell/issues/1723 http://superuser.com/questions/31445/gnu-bc-modulo-with-scale-other-than-0 This is why we can't have nice things.
* math.fish: support floating-point mathsGravatar David Adam2014-09-27
| | | | | | | Closes #1643. Thanks to Mickaël RAYBAUD-ROIG (https://github.com/m-r-r) for the idea of printf.
* Fix emacs completion on OS XGravatar lledey2014-09-24
| | | | Avoid calling seq with 0 as argument since its behaviour is wrong on OS X.
* Only print fish_greeting for interactive shellsGravatar Kevin Ballard2014-09-21
| | | | | | Shell scripts that use `read` should not trigger fish_greeting. Fixes #1401.
* Reset fish_bind_mode when changing fish_key_bindingsGravatar Kevin Ballard2014-09-18
| | | | | | | Also avoid resetting bindings if fish_key_bindings is "modified" without actually changing. Fixes #1638.
* Ignore "host", "hostname", and hostname wildcardsGravatar Michael Stillwell2014-09-16
| | | | See the PATTERNS section of ssh_config(5) for wildcards supported by ssh.
* Ensure `type` still works if $IFS is unsetGravatar Kevin Ballard2014-09-08
|
* Suppress PATH errors in sudo tab-completionGravatar Kevin Ballard2014-09-04
| | | | | | Setting a non-existant path component to PATH logs an error to stderr. This is not appropriate for non-interactive temporary modifications, like the one done by the `sudo` completion helper function.
* Fix F1 binding to work with multiple tokens.Gravatar Konrad Borowski2014-08-30
|
* Fix fish_vi_mode.fishGravatar Nikolai Aleksandrovich Pavlov2014-08-29
|
* Make the `alias` built-in function work betterGravatar Kevin Ballard2014-08-22
| | | | | | | | The new --wraps functionality was breaking aliases of the form `alias foo='bar baz'`. That is, aliases where the body is multiple words. Extract the first word of the body and use that instead. Use better errors for aliases with no name or no body.
* 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.
* | Make __fish_print_users work on OS X via dsclGravatar ridiculousfish2014-08-12
| |