aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions
Commit message (Collapse)AuthorAge
* add `function --shadow-builtin` flagGravatar Kurtis Rader2016-05-14
| | | | | | | | | | | | | | It's currently too easy for someone to bork their shell by doing something like `function test; return 0; end`. That's obviously a silly, contrived, example but the point is that novice users who learn about functions are prone to do something like that without realizing it will bork the shell. Even expert users who know about the `test` builtin might forget that, say, `pwd` is a builtin. This change adds a `--shadow-builtin` flag that must be specified to indicate you know what you're doing. Fixes #3000
* Remove the errant newline in __fish_cancel_commandline againGravatar ridiculousfish2016-05-13
|
* fix the style of several functionsGravatar Kurtis Rader2016-05-08
| | | | | | I'm going to modify these functions as part of dealing with issue #3000 and don't want those changes to be masked by running the files through `make style`.
* Change abbr to allow non-letter keys (#2996)Gravatar Elis Axelsson2016-05-06
|
* add floating point output to `math` commandGravatar Kurtis Rader2016-05-03
| | | | | | | | | | | This makes it easy for the user to request floating point output with the desired number of digits after the decimal point (not to be confused with significant digits). Note that this is just a thin wrapper so someone can say `math -s3 10 / 3` rather than `math "scale=3; 10 /3"`. Resolves #1643
* Bind btab also in vi-bindingsGravatar Fabian Homborg2016-05-03
| | | | | | It wasn't inherited. Fixes #2964.
* Add missing color definitions to __fish_init_1_50_0 reset. (#2987)Gravatar Jorge Bucaran2016-05-01
| | | | | | | | | | | | | | * Add missing color definitions to __fish_init_1_50_0 reset. The values where determined by inspecting the values of: * fish_color_end * fish_color_user * fish_color_host after resetting the color theme via fish_config. * Add documentation for fish_color_user and fish_color_host.
* don't use colors when writing the ^C indicatorGravatar Kurtis Rader2016-04-30
| | | | There was an extended discussion in https://github.com/fish-shell/fish-shell/issues/2904 about using a bright yellow background to make the cancelled command indicator, ^C, standout. The upshot was that standout (i.e., reversing fg/bg colors) mode should be used until themes are agumented with proper support for background colors and special characters.
* Erase the autosuggestion in fish_cancel_commandline by clearing to EOLGravatar ridiculousfish2016-04-29
|
* Remove an errant newline in the fish_cancel_commandline outputGravatar ridiculousfish2016-04-29
| | | | | Now the next line appears immediately after the cancelled line, without an intervening newline
* clarify fish_vi_mode deprecation warningGravatar Kurtis Rader2016-04-28
| | | | | | | Also, correct the Vi mode default escape timeout. I intended it to be 100 ms in my previous change but it ended up 10 ms which is far too short. A 10 ms delay will continue to cause problems for people running fish inside `screen`, `tmux`, or over high latency connections.
* provide a realpath implementationGravatar Kurtis Rader2016-04-28
| | | | | | | Not all distros have a `realpath` command. Provide a function that uses the real command if available else use the fish builtin. Fixes #2932
* Allow setting key bindings universallyGravatar Fabian Homborg2016-04-26
| | | | As always, we default to setting globally.
* Remove named arg in fish_default_key_bindingsGravatar Fabian Homborg2016-04-26
| | | | This wasn't actually used anywhere.
* Set fish_key_bindings globally in binding functionsGravatar Fabian Homborg2016-04-26
| | | | This should fix the tests.
* Deprecate fish_vi_modeGravatar Fabian Homborg2016-04-26
| | | | | This was never mentioned in the documentation as the way to switch to vi-mode, and now does nothing of value anymore.
* Let the binding functions set the binding variableGravatar Fabian Homborg2016-04-26
| | | | | This ensures they can just be called and "the right thing" will happen - fish_user_key_bindings will be executed, the variable will reflect the bindings.
* Remove $__fish_vi_modeGravatar Fabian Homborg2016-04-26
| | | | | | | This makes fish_mode_prompt rely on $fish_key_bindings instead. fish_bind_mode is also set in default mode (only always "default"), so it can't be used as the indicator.
* add way to comment/uncomment a commandGravatar Kurtis Rader2016-04-19
| | | | Fixes #2375
* Move 24bit setup into config.fishGravatar Fabian Homborg2016-04-18
| | | | Fixes #2941.
* number `dirh` output to make prevd/nextd easierGravatar Kurtis Rader2016-04-16
| | | | Fixes #2786
* provide a better experience when user presses \cCGravatar Kurtis Rader2016-04-14
| | | | Fixes #2904
* Remove the default self-insert binding in vi-default modeGravatar Fabian Homborg2016-04-12
| | | | Fixes #2832.
* Fix "." and ".." paths in cd completionsGravatar Fabian Homborg2016-04-08
| | | | | Previously if a directory called "a" was in $CDPATH, `cd ./a<TAB>` would complete from there even if it was invalid.
* Stringify many completions and functions, with --invert stringification.Gravatar Aaron Gyes2016-04-08
| | | | | | | | I believe apm must have been buggy - example output that I found online showed `tr` was mangling paths with spaces in it. Should be fixed. Also, use dscl on OS X in __fish_complete_users.fish like __fish_print_users.fish already does.
* cd completion: No description for absolute pathsGravatar Fabian Homborg2016-04-04
| | | | | This also removes the "pushd/popd" dance and only executes the CDPATH stuff when we need to.
* __fish_print_packages: use libzypp builtin cache for zypperGravatar Sam Yu2016-03-30
|
* Add history --helpGravatar Fabian Homborg2016-03-30
| | | | This was probably an oversight - the builtin supports it, the function doesn't.
* more fish_indent cleanup for prev commitGravatar Kurtis Rader2016-03-29
| | | | | Commit dfb23c4fce11d9d0577a2cb3c9e192bc24f64c8c was supposed to incude all the edits to make the code compliant with fish_indent.
* fix regression to vi-mode \cc bindingGravatar Kurtis Rader2016-03-29
| | | | | | | Commit c0e8ad6 on 2015-10-02 to "Make vi bindings inherit the defaults" inadvertently reverted commit b6b6de3. Fix that regression. And while I hate to make "git blame" say I changed the entire file make the function adhere to fish_indent style.
* limit size of cd history to 25 directoriesGravatar Kurtis Rader2016-03-23
| | | | | | | | | | | | | | | The existing implementation grows the $dirprev array without bounds. Besides causing what would appear to be a memory leak it also makes the nextd and prevd commands more expensive than they need to be. It also makes it harder to create a useful "menu" cd command. In addition to implementing a reasonable limit on the size of the $dirprev array I've reformatted the code using fish_indent. Update the documentation to include mentions of the $dirprev and $dirnext variables as well as the limit on how much directory history is kept. Fixes 2836
* Make reading ssh files case-insensitiveGravatar Fabian Homborg2016-03-22
| | | | Fixes #2843
* implement swap-selection-start-stop functionGravatar Federico Ferri2016-03-20
| | | | | | | | | The swap-selection-start-stop function goes to the other end of the highlighted text, the equivalent of `o' for vim visual mode. Add binding to the swap-selection-start-stop function, `o' when in visual mode. Document swap-selection-start-stop, begin-selection, end-selection, kill-selection.
* fix w, e (with a trick to cope with big-words)Gravatar Federico Ferri2016-03-20
|
* add \r equivalent bindingGravatar Kurtis Rader2016-03-20
| | | | | | | Add a binding that was overlooked by commit d65c63322ef52443b372c3c49dbd3584596fed6b. Fixes #2834
* make alt-L output respect multi-line promptsGravatar Owen Richardson2016-03-18
| | | | Fixes #718
* Migrate abbrs from =-separated to space-separatedGravatar Fabian Homborg2016-03-02
| | | | | | | | | We silently upgrade existing abbreviations and change the separator when saving. This does not yet warn when the user is using the old syntax. Resolves #2051
* Check ssh's KnownhostsFiles in print_hostnamesGravatar Fabian Homborg2016-03-02
| | | | | | | | These are an additional source of information Thanks to @sysbot (#2313) for the inspiration. This also stringifies the ssh_config reading
* print_hostname: Avoid matches in fstab comments harderGravatar Fabian Homborg2016-03-02
|
* Stringify reading nfs in print_hostnamesGravatar Fabian Homborg2016-03-02
|
* Ignore zero-ips in print_hostnamesGravatar Fabian Homborg2016-03-02
| | | | This would be a lot of useless options for those who block via hosts.
* history.fish: Fix input handlingGravatar Jaime Marquínez Ferrándiz2016-03-02
| | | | Pass the input to 'string', it was accidentally removed in fcdc6a48c0bbdc796975db8d0b7f32434d86d249.
* Use command which in typeGravatar Fabian Homborg2016-02-28
| | | | | | | | Turns out some shells will alias which to be something function-aware, but doing this on fish would blow up because it would call type which would then call which which would then call type.... Fixes #2775
* Rewrite __fish_urlencode to not encode valid charactersGravatar Kevin Ballard2016-02-27
| | | | | | Much better to only encode the characters that are not URL-safe. This also doesn't involve any forking, and it even handles newlines and NULs in the input.
* Try to just see if grep is happy with --color=auto, or not, as the --help ↵Gravatar Aaron Gyes2016-02-20
| | | | exit status varies in BSD vs. GNU.
* Fix the file URL for Terminal.appGravatar Jak Wings2016-02-16
| | | | | | | * When using a UTF-8 locale, set locale to C temporarily in order to read one byte at a time. * Use the builtin printf in a forward-compatible way. (GNU) * Improve the readability of the code.
* Correctly handle --merge in the history.fish functionGravatar ridiculousfish2016-02-16
| | | | | Previously --merge happened to work, but only because it was smuggled in through the 'print' command
* Fix typoGravatar Aaron Gyes2016-02-16
|
* Fix --merge hitting a caseGravatar Aaron Gyes2016-02-16
|
* Improve __fish_print_usersGravatar Sunguk Lee2016-02-15
| | | | Patch from `__make_users_completions` of killall command completion