aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions
Commit message (Collapse)AuthorAge
...
* 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
| |
* | Add support for toor account.Gravatar Konrad Borowski2014-07-30
| | | | | | | | | | | | | | Currently fish doesn't recognize toor as special. However, it's likely that on BSD systems, fish shell will be used on toor, not on root (toor is an intentionally existing account to use more advanced shell on, like shell).
* | Fix umask function regexGravatar David Xia2014-07-29
| | | | | | | | | | | | Some grep implementations complain of empty subexpression fixes #1313
| * type: Restore combined flags behaviorGravatar Kevin Ballard2014-07-14
| | | | | | | | | | Fix the parsing of `type` flags to handle combined short flags as appropriate, e.g. `type -qf ls`.
| * command: Rename -p/--path flag to -s/--searchGravatar Kevin Ballard2014-07-13
| |
| * type: Stop claiming `grep` is a functionGravatar Kevin Ballard2014-07-13
| | | | | | | | | | | | | | | | | | | | | | | | Use `functions -q` instead of searching the `functiosn -na` list for the provided word. This may result in an automatically-loaded function being sourced, but that happens anyway with the default output. This change means the results of `test -q foo` can be relied upon to indicate whether `foo` can actually be invoked. Previosly, if `foo` was the name of an automatically-loaded function file but did not actually define a function `foo`, and there was no execuable `foo`, then `type -q foo` would lie and say `foo` can be invoked when it can't.
| * Adopt the new type -q flag in the other functionsGravatar Kevin Ballard2014-07-13
| |
| * test: Add a new --quiet flag to suppress outputGravatar Kevin Ballard2014-07-13
| | | | | | | | | | | | | | | | | | | | The --quiet flag is useful when only the exit status matters. Fix the documentation for the -t flag to no longer claim that `type` can print "keyword", as it never does that. Stop printing a blank line for functions/builtins when the -p flag has been passed. It's just not useful.
| * type: Separate the notion of multi and pathsGravatar Kevin Ballard2014-07-13
| | | | | | | | | | | | | | Track whether -a and -f have been supplied separately. That way both `type -a -f command` and `type -f -a command` behaves correctly, as does `type -a -f foo` where there are multiple executables named `foo` in the $PATH.
| * Fix `type` function to work betterGravatar Kevin Ballard2014-07-13
|/ | | | | | | | | | | | | | | | | | | | Stop using getopt to parse flags. It's far more expensive than necessary, and results in long flags not being parsed on OS X. This also allows args starting with - after the options list to be properly interpreted as a value to test. Print the error message to stderr as is appropriate. Use the new `command -p` functionality when the -a flag has not been provided (`command` does not have any equivalent to the -a flag), instead of using `which`. This is faster and also avoids any possible disagreement between `which` and what fish thinks is valid. Stop testing every path to see if it's executable, that test has already been done by `which` or `command -p`. The end result is `type -P ls` is roughly 250% faster, according to profiling, on my OS X machine.
* Also add forward/backward movement in insert modeGravatar Sascha2014-06-27
|
* Provide more useful insert mode mappingsGravatar Sascha2014-06-27
|
* Fix bug for systemd being installed but not PID 1Gravatar Cameron Norman2014-06-20
|
* git prompt shouldn't export variables.Gravatar Konrad Borowski2014-06-01
|
* avoid symlink attacks in __fish_print_packages and spawning fishdGravatar David Adam2014-05-12
| | | | | | | | | | * use $XDG_CACHE_HOME for __fish_print_packages completion caches * when starting fishd, redirect fishd output to /dev/null, not a predictable path Fix for CVE-2014-3219. Closes #1440.
* Fix python completion to work for pypyGravatar Josh Kuhn2014-05-03
| | | | Pypy outputs 2 lines with the -V option, as well as adding a whole lot of stuff that confuses the very general sed regex that was used before.
* Functions instead of static variables for conditions.Gravatar SanskritFritz2014-05-03
|
* use mktemp(1) to generate temporary file namesGravatar David Adam2014-04-28
| | | | | | | | | | | | | Fix for CVE-2014-2906. Closes a race condition in funced which would allow execution of arbitrary code; closes a race condition in psub which would allow alternation of the data stream. Note that `psub -f` does not work (#1040); a fix should be committed separately for ease of maintenance. Closes #1437
* Set fish_vi_key_bindings to start in insert mode by defaultGravatar Maxim Gonchar2014-04-19
| | | | | | Add optional argument for fish_vi_key_bindings to set desired initial mode: > fish_vi_key_bindings default
* Bind 0 to beginning-of-line in vi mode.Gravatar Steven Allen2014-04-06
|
* Move cursor back on insert mode exit.Gravatar Steven Allen2014-04-06
| | | | Make this consistent with vi.
* Fix non-verbose, non-informative __fish_git_promptGravatar Kevin Ballard2014-03-31
| | | | | | | | At some point the non-verbose, non-informative variant of the prompt (e.g. the variant that looks like the bash prompt) was modified to try and show the behind/ahead counts the same way the informative prompt does. Besides being wrong, it also didn't work because behind/ahead weren't defined.
* Merge branch 'master' of github.com:fish-shell/fish-shellGravatar ridiculousfish2014-03-30
|\
* \ 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
| | * Fixed appearance of ssh hostnames with [] in themGravatar Knut Ahlers2014-03-29
| |/ | | | | | | refs https://github.com/fish-shell/fish-shell/issues/1355
| * Force at least one line of output for `set_color`.Gravatar Konrad Borowski2014-03-03
| | | | | | This should fix #1323.
| * Make fish install a command_not_found handler in non-interactive uses.Gravatar ridiculousfish2014-02-20
| | | | | | | | | | | | | | | | | | | | | | Previously, fish's command_not_found handler would be installed in __fish_config_interactive. Errors that occured early in startup (e.g. in config.fish) or in non-interactive mode would therefore not be reported. With this change, fish now exposes its default cnf handler as __fish_default_command_not_found_handler . config.fish then installs a cnfh that invokes the default. When fish goes interactive, the initial cnfh is overwritten with a fancier one, that may in turn fall back to invoking the default.
| * Caching for pacman packages.Gravatar Eric Mrak2014-02-16
| |
| * adding completion for aura. adding pacman integration for __fish_print_packagesGravatar Eric Mrak2014-02-16
| |
| * 'seq' should return 1, not exit 1, on bad arglistGravatar waterhouse2014-02-16
| |