Commit graph

1473 commits

Author SHA1 Message Date
Fabian Homborg
a998921f39 git: Complete reflog for reset 2016-05-13 16:18:29 +02:00
CoolOppo
3daccf3c22 fix typo in webconfig.py comment 2016-05-11 19:51:08 -07:00
Fabian Homborg
c63c88262b Indent git completion
It's about time I finally fixed my emacs config.
2016-05-11 15:06:10 +02:00
Fabian Homborg
fbe2cdc3c7 git completion: Complete commits for cherry-pick if at least three
characters are given
2016-05-11 15:05:56 +02:00
Fabian Homborg
b60ef72c3d git completion: Fix option-before-command for stash
Because it allows sub-subcommands, it has functions to determine which,
if any, is used. These were too simplistic.
2016-05-11 15:03:05 +02:00
Fabian Homborg
d2e79cf6f6 git completion: More stringification 2016-05-11 15:03:05 +02:00
Fabian Homborg
a38d5504ac git completion: Allow --pretty for more commands
This _should_ be all of them.
2016-05-11 15:03:04 +02:00
Fabian Homborg
76d24aa1bc git completion: Allow more than one arg to using_command
Now we can easily add an option to multiple commmands.

This should also fix some edgecases.
2016-05-11 15:03:04 +02:00
Fabian Homborg
a7605d584b git completion: Show commits for revert and tag --contains 2016-05-11 14:51:54 +02:00
Terje Larsen
4244a6e6fe Add git commit --fixup completions (#3021) 2016-05-11 13:33:22 +02:00
Kurtis Rader
3626c39398 fix the style of several functions
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`.
2016-05-08 16:27:15 -07:00
Vladimír Čunát
100eef4e42 docs: fix location of generated_completions (#3010) 2016-05-08 13:51:30 +02:00
[Redacted]
59c8800c4d Added completions for rmmod (#3007) 2016-05-08 10:01:57 +02:00
Daniel Bergmann
ac47100a7d Add tags to completion list for git show. (#2998) 2016-05-07 12:05:44 +02:00
Elis Axelsson
1c6f6df2b3 Change abbr to allow non-letter keys (#2996) 2016-05-06 16:15:47 +02:00
Fabian Homborg
527e5f52ba Remove useless case completions
It doesn't take options and what it takes (arbitrary strings) we can't
sensibly complete.
2016-05-04 14:51:09 +02:00
Kurtis Rader
d97c22df2d add floating point output to math command
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
2016-05-03 19:29:04 -07:00
Fabian Homborg
ed086fb1c8 Bind btab also in vi-bindings
It wasn't inherited.

Fixes #2964.
2016-05-03 16:29:15 +02:00
Jorge Bucaran
08c29727e0 Add missing color definitions to __fish_init_1_50_0 reset. (#2987)
* 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.
2016-05-01 11:58:43 +02:00
Kurtis Rader
a897ef0025 don't use colors when writing the ^C indicator
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.
2016-04-30 12:25:15 -07:00
Fabian Homborg
fb1443a885 Remove using_command from netctl completions
This allows `; and netctl` to work.

First step towards #2705.
2016-04-30 16:53:20 +02:00
Fabian Homborg
fde26d4049 git completion: Allow optional "+" for push
This signifies a force-push.

To avoid cluttering, only complete branches if a + is already given.

Fixes #2879.
2016-04-30 16:30:02 +02:00
Fabian Homborg
b32bf22616 Add repository/refspec completion to git
A few commands (fetch, pull and push at least) take a "repository" (aka
"remote") and then a "refspec" (we currently do branches here).

Fixes #2525 (seems that man is still alive)
2016-04-30 16:21:41 +02:00
ridiculousfish
b064da8d38 Erase the autosuggestion in fish_cancel_commandline by clearing to EOL 2016-04-29 15:33:46 -07:00
ridiculousfish
ba5a55b754 Remove an errant newline in the fish_cancel_commandline output
Now the next line appears immediately after the cancelled line,
without an intervening newline
2016-04-29 14:55:23 -07:00
Sanne Wouda
8fc6011741 git takes --help even when it needs a command (#2984)
`git --help` is a valid command and fish should complete it as such
2016-04-29 12:42:15 +02:00
Kurtis Rader
3e24ae80b3 clarify fish_vi_mode deprecation warning
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.
2016-04-28 20:53:09 -07:00
Kurtis Rader
6c329e8a83 provide a realpath implementation
Not all distros have a `realpath` command. Provide a function that uses the
real command if available else use the fish builtin.

Fixes #2932
2016-04-28 16:03:27 -07:00
Fabian Homborg
5fa8370c13 git completion: Only show unmerged branches for cherry-pick 2016-04-28 21:30:26 +02:00
Cody Scott
96a28df018 switch to newer flag --set-upstream-to for git (#2982)
set-upstream was deprecated in git 1.8.0 as stated in [1] in favor
of set-upstream-to. this patch replaces the old flag in fish
completions

[1]: https://raw.githubusercontent.com/git/git/master/Documentation/RelNotes/1.8.0.txt
2016-04-28 21:26:45 +02:00
Fabian Homborg
bc35ca6366 Make busctl completions useful
- More accurate

- Fast enough to be usable (previously, this would sometimes take a few
  seconds)

- A bit smaller
2016-04-27 14:22:16 +02:00
Fabian Homborg
daa217f533 Allow setting key bindings universally
As always, we default to setting globally.
2016-04-26 15:21:15 +02:00
Fabian Homborg
e67505bead Remove named arg in fish_default_key_bindings
This wasn't actually used anywhere.
2016-04-26 15:21:15 +02:00
Fabian Homborg
e6ad48ea1b Set fish_key_bindings globally in binding functions
This should fix the tests.
2016-04-26 15:21:15 +02:00
Fabian Homborg
ba5a22e2ce Deprecate fish_vi_mode
This was never mentioned in the documentation as the way to switch to
vi-mode, and now does nothing of value anymore.
2016-04-26 15:21:15 +02:00
Fabian Homborg
f5241da836 Let the binding functions set the binding variable
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.
2016-04-26 15:21:15 +02:00
Fabian Homborg
8ab980b793 Remove $__fish_vi_mode
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.
2016-04-26 15:21:15 +02:00
Kurtis Rader
2f8d0e9aba add way to comment/uncomment a command
Fixes #2375
2016-04-19 18:38:58 -07:00
Fabian Homborg
ba1008b750 Allow overriding fish_term24bit on launch 2016-04-18 14:19:34 +02:00
Fabian Homborg
8558561650 Move 24bit setup into config.fish
Fixes #2941.
2016-04-18 14:19:34 +02:00
Kurtis Rader
f034d8ba3a number dirh output to make prevd/nextd easier
Fixes #2786
2016-04-16 18:40:16 -07:00
Yauhen Kirylau
21e927d24e Add completions for 'pacaur' (#2934) 2016-04-15 13:45:48 +02:00
Kurtis Rader
5f849d0264 provide a better experience when user presses \cC
Fixes #2904
2016-04-14 20:57:04 -07:00
Laurence McGlashan
b5b8d9010e Correct typo in valgrind completions 2016-04-13 14:54:33 -07:00
Fabian Homborg
85799ee86e Remove the default self-insert binding in vi-default mode
Fixes #2832.
2016-04-12 21:40:14 +02:00
Fabian Homborg
d7c690b416 Fix "." and ".." paths in cd completions
Previously if a directory called "a" was in $CDPATH, `cd ./a<TAB>` would
complete from there even if it was invalid.
2016-04-08 15:03:49 +02:00
Aaron Gyes
36691df6fe Stringify many completions and functions, with --invert stringification.
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.
2016-04-08 10:49:29 +08:00
David Adam
200a10e78d Rename "snippets" to "conf" internally, and document them as snippets
Discussed in #2896.
2016-04-06 09:33:09 +08:00
David Adam
484c1484c9 Customisable extra configuration, completion and function directories
- Add options to the autotools build to set the path for the "vendor"
   or "extra" configuration snippets, functions and completions
   directories.

 - Remove the vendor_completions directory from the Xcode build, as
   these are relocatable and compiling the paths in does not make sense.

This allows packaging tools like Homebrew and Nix to use a common
directory outside of the main prefix for third-party completions, and
to make these available for programmatic discovery through `pkg-config`.

Closes #2113
2016-04-04 15:58:13 -07:00
Fabian Homborg
0953590cca cd completion: No description for absolute paths
This also removes the "pushd/popd" dance and only executes the CDPATH
stuff when we need to.
2016-04-04 18:22:48 +02:00