Commit Graph

1419 Commits

Author SHA1 Message Date
Fabian Homborg
baa6971a46 Add __fish_vcs_prompt helper function
This is supposed to be used by prompts so they'll get all known vcsen
integrated.

For now, there's no distinction between the different vcsen.
2015-12-16 19:05:28 +01:00
Fabian Homborg
f045d9b143 Improve mount completion (now with blockdevices!)
This adds blockdevices (and directories) and fixes the regexes to no
longer include comments but include UUID= and LABEL=, which at least
util-linux mount understands.

It also shouldn't fail on systems without fstab any longer (like default OSX).

Fixes #2606.
2015-12-13 20:38:38 +01:00
Fabian Homborg
6c8518dd10 Update vte cwd on launch
Fixes #2418
2015-12-12 12:22:08 +01:00
Fabian Homborg
346d918555 Delete upstreamed docker completions
A better version of these has been in an upstream release, so there's no
need to keep this around.
2015-12-12 12:13:05 +01:00
Fabian Homborg
8104854d5d Update makepkg completion
A few options were missing and --asroot has been removed
2015-12-11 12:19:30 +01:00
David Adam
a0eef2663a git completions: add missing description flags
Fixes syntax error introduced in 4280df3aa2.
2015-12-11 10:42:19 +08:00
Samantha Marshall
f5dfebb6a3 Add __fish_svn_prompt function
This refactors __fish_print_svn_rev to not depend on english locale
2015-12-10 18:17:40 +01:00
Fabian Homborg
2b7ffca414 Merge pull request #2595 from lordlycastle/master
Added OS X completions for open, and seq.
2015-12-10 15:32:18 +01:00
lordlycastle
96b3e1ce1b Added OS X completions for open, and seq. Added missing stdout redirection to /dev/null when checking command's version. 2015-12-10 14:20:46 +00:00
mr.Shu
4280df3aa2 git: Add missing options to git clone
* Add missing options to `git clone` in order to make the suggestions as
  similar to the manual (https://git-scm.com/docs/git-clone) as
  possible.

Signed-off-by: mr.Shu <mr@shu.io>
2015-12-10 12:54:45 +01:00
Fabian Homborg
b73bf53bd3 Enable 24-bit mode for selected terminals
Unfortunately, there's no standard way to detect support (importantly,
terminfo doesn't encode it), but there's a variety of terminals that
support it that we can detect.

It's better than letting this functionality go to waste.

Check KONSOLE_PROFILE_NAME instead of DBUS_SESSION because Konsole can be compiled without dbus support.

Check ITERM_SESSION_ID's format for 24bit support

This has changed since the last release, just like 24bit support. So if
we check one, we get the other.
2015-12-10 12:47:45 +01:00
Fabian Homborg
0212314479 Merge pull request #2586 from mrshu/mrshu/add-git-cherry-pick-options
git: Add more options to `git cherry-pick`
2015-12-09 16:41:34 +01:00
Kurtis Rader
d65c63322e allow \cJ (\n) to be bound separate from \cM (\r)
This makes it possible (on UNIX systems, don't know about MS Windows)
to bind \cJ (\n) independently of \cM (\r, aka [enter]).

Resolves #217
2015-12-08 21:01:31 -08:00
mr.Shu
a8837f537f git: Add more options to git cherry-pick
* Add more options to `git cherry-pick` so that the suggested options
  mimic the man page (https://www.git-scm.com/docs/git-cherry-pick/).

Signed-off-by: mr.Shu <mr@shu.io>
2015-12-08 23:51:29 +01:00
David Adam
ef67fc7ba0 __fish_complete_man: rework AWK script
Adds support for the man-db alias format used in CentOS/RHEL 5
Adds basic support for the output of apropos on Solaris

Work on #2087.
2015-12-04 16:23:57 +08:00
Fabian Homborg
d325b4bf39 Add completion for pkg-config 2015-12-03 13:11:53 +01:00
Fabian Homborg
1d64c480c4 Add completion for systemd-nspawn 2015-12-03 12:53:10 +01:00
Fabian Homborg
9f7334deef Add completion for systemd-analyze 2015-12-03 12:52:59 +01:00
mr.Shu
1a5d0fc47f git: Improve completion for git remote
* Make sure that the `git remote` subcommands are not repeatedly
  suggested (that is do not suggest a subcommand if there already is one).

* Add both long and short options to `git remote` subcommands where
  appropriate.

Signed-off-by: mr.Shu <mr@shu.io>
2015-11-29 22:14:11 +01:00
Fabian Homborg
17b6936f53 Merge pull request #2573 from mrshu/mrshu/add-missing-git-remote-subcommands
git: Add missing remote subcommands completion
2015-11-28 14:41:37 +01:00
Fabian Homborg
c5bcc4567e Merge pull request #2572 from lordlycastle/master
Added completions for cat, cp, mktemp, stat, touch for OS X.
2015-11-28 14:41:03 +01:00
mr.Shu
7b3d93f4a1 git: Add missing remote subcommands completion
* Add completion for missing `git remote` subcommands.

* Should fix #2567

Signed-off-by: mr.Shu <mr@shu.io>
2015-11-28 03:24:59 +01:00
lordlycastle
3868203c76 Added completions for cat, cp, mktemp, stat, touch for OS X. 2015-11-28 00:35:26 +00:00
Daniel Matz
b7f13b4685 Complete bg and fg with job PIDs. 2015-11-27 16:07:16 -08:00
Daniel Matz
c2c4fbf206 Add a function to complete job PIDs. 2015-11-27 16:07:16 -08:00
Fabian Homborg
53fc9a4002 Remove circular dependency in fallback seq
This was subtle because `type` invoked seq.

Fixes #2570
2015-11-27 19:34:27 +01:00
Fabian Homborg
a8a9ac0dae Add completion for OSX rm
As always, this not only doesn't support longopts, but also has some
options that GNU rm doesn't - in this case, an undelete function.
2015-11-27 11:28:41 +01:00
Daniel Matz
3b53abecd0 Update hg completion
This does a number of things:
- Removing trailing space from suggested repos for hg.
- Use the string builtin for hg completions.
- Add more internal merge tools to hg completion.
- Enable completions for abbreviated hg commands.
- Stop completing a deprecated hg branches option.
- Properly match the hg subcommand when preceeded by global switches.
- Stop completing deprecated hg glog.
- Complete hg config instead of showconfig.
- Properly complete when global switches are before the hg command.
- Properly handle the repository switch for hg completions.
- Properly handle the hg global switch cwd.
2015-11-23 19:39:58 +01:00
Fabian Homborg
3f12f75853 Add completions for OSX which 2015-11-23 13:37:53 +01:00
Fabian Homborg
917c727619 Add more sudo options 2015-11-23 13:32:29 +01:00
Fabian Homborg
6336288da1 Support the OSX versions of head/tail
See #2537.

These were written from the online versions of the manpages.
2015-11-19 21:32:21 +01:00
Fabian Homborg
3e0ff6db2a math: Join lines manually
This is an issue with 15-year old versions of bc that don't support BC_LINE_LENGTH.

Closes #2548
2015-11-19 12:04:21 +01:00
Eugene Sharygin
5db811253e psub: add -s, --suffix 2015-11-14 13:15:30 +01:00
Fabian Homborg
e31a93040e Add completion for string
A bit simplistic since we can't complete e.g. regexes properly, but it
does the job.

Fixes #2543
2015-11-12 15:08:47 +01:00
ridiculousfish
e50d104399 Remove duplicate \cw binding in default key bindings 2015-11-08 23:52:59 -08:00
Alexander Hedges
32d54e37f7 Use unused cleanup_autogenerated_file 2015-11-08 12:19:15 -08:00
Alexander Hedges
2bbad22248 Remove autogenerated files before generating the new ones
Currently if there is a conflict with two manpages having the same
name, one completion will override the other. But if one can be parsed
and the other can't the one with parsed results will always have a
higher priority.
2015-11-08 12:19:15 -08:00
Alexander Hedges
22493c9df8 Guard against files that don't end in .[1...9]
It seems smart to only let files be parsed that are clearly
manpage files. Other files wouldn't be openend by man so
I think it is safe to guess that only these files are man
pages.
2015-11-08 12:19:15 -08:00
Alexander Hedges
8d97a85834 Ignore references to builtin on the mac
On my system (OS-X 10.11) references to builtin are denoted by:
".so man1/builtin.1". So you also need to check against that.
2015-11-08 12:19:15 -08:00
Fabian Homborg
c9577394eb vi-mode: Inherit \cf and \cb bindings as well
This makes them {forward,backward}-char instead of -word, which means
they accept suggestions _fully_.

Fixes #2255
2015-11-06 10:25:27 +01:00
maxried
0918ad6cee Improve apt-get completion
Added apt-get changelog sub-command completion.
2015-11-01 12:30:17 +01:00
maxried
1055864438 Update fish_default_key_bindings.fish
fish_default_key_bindings.fish comments were wrong. Corrected comment about pagination.
2015-10-29 07:51:17 +01:00
Fabian Homborg
be0d9d093c vi-mode: Make \cb do backward-word again
This is mentioned in the documentation, so keep it for now.
2015-10-28 13:20:23 +01:00
Fabian Homborg
bb491742ea vi: Bind \cx to end-of-line in insert mode
This will also accept any autosuggestion completely.
2015-10-28 13:18:27 +01:00
Bheesham Persaud
46fbfaaa83 Add cargo and rustc completion.
rustc.fish makes heavy use of the `string` commands.
2015-10-26 21:39:16 -04:00
Gary Peck
09bd938e25 Add ability to customize the amount of path shortening in prompt_pwd
Allows the length of each shortened path component to be customized by setting the `fish_prompt_pwd_dir_length` variable to the number of characters to include (plus a leading dot because that's special). Maintains the default behavior of shortening path components to just one character. You can also set `fish_prompt_pwd_dir_length` to an empty or invalid value or 0 to disable shortening completely.
2015-10-26 13:11:13 +01:00
Fabian Homborg
3e7dfd7f5e Switch useradd and chsh to string 2015-10-21 12:38:45 +02:00
David Adam
f21d826850 fish_complete_subcommand: shadow scope to inherit e.g. $PATH
Closes: #2141.
2015-10-21 15:38:20 +08:00
Jan Ernsting
8e3e286577 Update mix completion
Among others `mix escriptize` has not been supported since July 2014:
https://github.com/elixir-lang/elixir/issues/2468

Also explain what mix is.
2015-10-20 17:10:41 +02:00
Fabian Homborg
f4b4e5b41f git: Complete subcommands for git submodule foreach 2015-10-20 15:49:45 +02:00
Fabian Homborg
4a05d56337 git: Disable submodule subcommand completion if one is already given 2015-10-20 15:49:22 +02:00
Fabian Homborg
73708061fc Fix git submodule completions
Fixes #2494
2015-10-20 15:42:48 +02:00
Fabian Homborg
df3da55602 git completion: Allow branches with "/" in them as unique remote branches 2015-10-16 17:15:37 +02:00
David Adam
b776327b9d Revert "prompts: more concise way of getting the hostname."
This reverts commit 233c443694.

See discussion in https://github.com/fish-shell/fish-shell/pull/2489
2015-10-16 07:01:12 +08:00
Michael Fogleman
233c443694 prompts: more concise way of getting the hostname. 2015-10-15 11:59:39 +08:00
Fabian Homborg
35bbc1d7b7 vi: Make \cf do forward-word again in insert mode 2015-10-14 18:34:58 +02:00
Fabian Homborg
4e5e04bfda vi: Readd \cx binding 2015-10-14 18:31:45 +02:00
Fabian Homborg
c0e8ad6f1f Make vi bindings inherit the defaults
This reduces code duplication and adds some previously unavailable
bindings that don't quite _violate_ the vi-principle (like
prevd-or-backward-word on alt-left) and matches other "impure" bindings
like \cf for forward-word (a quite emacs-ish binding) we already have.

Fixes #2412
Fixes #2472
Fixes #2255
2015-10-13 21:08:55 +02:00
buo
3472a39d07 Add BSD specific arguments for tr command completion 2015-10-13 15:52:14 +02:00
Fabian Homborg
9865a8c807 Also send konsole cursor sequence for iTerm2
Fixes #1403
2015-10-13 15:36:55 +02:00
Matt Steedman
35e769d494 Make fish_vi_cursor check $TERM or use argument
Fixes #2475
2015-10-13 15:33:45 +02:00
Fabian Homborg
54f215294f export: Fix replacing
Also run it through fish_indent
2015-10-12 11:35:45 +02:00
Fabian Homborg
98b33d7b6b Fix pushd completions in the -n case 2015-10-09 20:02:28 +02:00
Fabian Homborg
86471ac21f Remove OSX/Cygwin special cases from prompt_pwd
For cygwin, you can't `cd C:`, so a prompt of "C:/Something" is
misleading.

For OSX, we dereference symlinks elsewhere

This also simplifies prompt_pwd quite a bit.
2015-10-09 17:45:45 +02:00
David Adam
57e22e87c2 functions/man.fish: add fish into MANPATH even if it is already set
Closes #2443.
2015-10-09 21:01:59 +08:00
ridiculousfish
434eabb787 Remove errant slash from the end of cd completions
Fixes #2465
2015-10-07 13:39:42 -07:00
Fabian Homborg
0a99772572 Rewrite __fish_complete_cd
This no longer uses "eval" (which is scary), and is a bit shorter (which
is nice).

Fixes #2299
Fixes #952

Improves #2300
Improves #562
2015-10-07 10:41:05 +02:00
Fabian Homborg
2ffb47eba2 Add missing \n to pushd completions 2015-10-07 10:26:27 +02:00
Fabian Homborg
b208d752e2 git completion: Complete files relative to repo-root
Not for _everything_ because that causes too many options to be
generated (which is an issue for git as it is), but for modified, staged
and added files - which is where it is most useful.

Fixes #901 as far as I'm concerned.
2015-10-06 14:05:08 +02:00
Fabian Homborg
ec74479d44 Add pushd -n to completions, use string
Also indent with fish_indent
2015-10-05 15:23:05 +02:00
Derek Harland
e75108fc4c Improve pushd completions
Add completions for rotating and swapping the stack.
2015-10-05 15:12:38 +02:00
Fabian Homborg
176e34cf73 Remove ls|__fish_sgrep from apt-proxy-import 2015-10-04 15:45:02 +02:00
Fabian Homborg
65415cb761 Move make completion to string
This also removes a hack that's not needed anymore
2015-10-04 15:41:20 +02:00
Fabian Homborg
45bf843b03 Move python comp away from eval and sed
I have no clue why this used eval.
2015-10-04 15:41:20 +02:00
Fabian Homborg
610a5926a8 Move apt-show-versions away from ls|__fish_sgrep
This is almost trivial to do with builtins.
2015-10-04 15:41:20 +02:00
Fabian Homborg
3b0f9911e2 Move setfacl completions to string 2015-10-04 15:41:20 +02:00
Fabian Homborg
55a2945449 Bring aura completions in line with pacman
Eliminates a bit of __fish_sgrep
2015-10-04 15:41:20 +02:00
Ian Ray
16061d06a9 prompt_pwd: zero fork prompt in general case
Now only one fork (uname) occurs on first load.
2015-10-04 12:36:49 +02:00
Fabian Homborg
5f2feee680 git completion: Bring needs_command in line with git
git has options that can appear before commands, but not all of
them, and some of them need an argument. This means
`__fish_seen_subcommand_from`  will give too many false-positives, while
`[ (count $cmd) -eq 2 ]` will give too many false-negatives.

Instead go through all arguments and check if they are in that list of
options that can be before a command and skip the argument for them, if
any.
2015-09-30 15:14:09 +02:00
Fabian Homborg
b9b39f7c31 Replace sed -E with string replace
This is to the benefit of systems with ancient GNU sed, which does not
recognize "-E", but only "-r".

Fixes #2305 - even if it doesn't replace all `sed -E` invocations in the
codebase, the others are unlikely to occur on CentOS and other similarly
crusty systems.
2015-09-28 20:06:20 +02:00
Dan Underwood
37f4cbe3d7 Fix of multiple synonyms for apm command
`__fish_apm_using_command` was incorrectly taking lists of commands, new function added to support multiple a command having synonyms.

Simplify switch statement

Also remove superfluous function.

Allow for multiple completions after a command

Useful for removing packages, will complete for more than one.

Code improvements
2015-09-28 18:30:08 +01:00
Fabian Homborg
126c8c14b8 machinectl: Add "shell" subcommand 2015-09-28 16:22:29 +02:00
Fabian Homborg
3992315505 Normalize cabal* completion 2015-09-28 16:08:01 +02:00
Fabian Homborg
eb4e4fa7ad Normalize aura completions
Also fixes bug related to repo listings
2015-09-28 15:39:51 +02:00
Fabian Homborg
aa37b40d93 __fish_hg_prompt: Clean up a bit
`sort -u | uniq` is completely redundant, calling grep for every
status-pair is unnecessary, `contains` doesn't take the word "in" as
special.

None of these are critical and there's basically no performance benefit
since this function is utterly dominated by hg calls.
2015-09-27 16:30:37 +02:00
Fabian Homborg
8eccf8a6f7 __fish_hg_prompt: Remove explicit root check again
This doesn't add anything except slowing the function down by about
33%. Checking for a branch is just as good and that is displayed in the
prompt anyway.
2015-09-27 16:23:11 +02:00
Jan Ernsting
7376639789 Fix completion for totem 2015-09-27 14:36:16 +02:00
Fabian Homborg
2334374fd6 math: Avoid calling env 2015-09-27 12:51:24 +02:00
Fabian Homborg
95908aa2bc __fish_hg_prompt: Only show current bookmark 2015-09-26 21:52:20 +02:00
Fabian Homborg
a19f4dd4c8 __fish_hg_prompt: Add bookmark support 2015-09-26 20:41:18 +02:00
Fabian Homborg
eadd4d9b71 __fish_hg_prompt: Bail early if not in a hg repo 2015-09-26 20:40:48 +02:00
Wonicon
4f3ff3d77f Correct the comment on the default path
According to the newer code below:
    xdg_data_home = os.getenv('XDG_DATA_HOME', '~/.local/share')
the actual default path is ~/.local/share/fish/generated_completions/
2015-09-26 15:23:45 +02:00
Fabian Homborg
5bb81461f6 Normalize ls completions and bring them up-to-date
This adds the --group-directories-first option for GNU ls and fixes a
typo in --block-size (not --blocksize).

Fixes #2425.
2015-09-26 11:40:04 +02:00
Fabian Homborg
d591cebf44 Introduce __fish_print_pacman_repos helper
This is used in at least 4 places, all of which have a bug in that they
print "options" as a valid repo. It seems better to fix it once,
especially given that there are tons of AUR helpers and pacman wrappers,
all of which might need this info.
2015-09-25 13:37:39 +02:00
Fabian Homborg
f24d5cb5f0 __fish_print_{addresses,interaces}: Better OSX/BSD 2015-09-24 15:32:15 +02:00
Fabian Homborg
79c22c76bf __fish_print_{addresses,interfaces}: Add alternative to net_tools
net_tools, which provides `ifconfig` and `netstat`, among other things,
has last been updated in 2013. This means `ifconfig` on linux is
basically dead.

Instead of ifconfig, use `ip` (from iproute2), which is much more powerful and
provides a much more annoying commandline syntax.

Instead of netstat, just look at /sys/class/net.
2015-09-24 15:32:15 +02:00
Fabian Homborg
20e96df85d export: Enable values with "=" in them
Only split on the first "=" to achieve this.

Closes #2403
2015-09-24 15:28:58 +02:00
Fabian Homborg
be51fe944d Fix vi* completions
I forgot a "-c".
2015-09-23 19:01:34 +02:00
Fabian Homborg
54d1d98e39 Fix aliases with whitespace
And document how that stuff works.

Fixes #2220

Also, the string stuff is cool.
2015-09-23 13:28:32 +02:00
Fabian Homborg
6f92781992 Refactor *vi* completions, add nvim wrapper
This assumes `vim` is always vim (or close enough, nvim should also
work), while `vi` could be either.

Fixes #2416
2015-09-23 12:59:05 +02:00
Fabian Homborg
fb615843b3 git completion: Describe aliases with their definitions
I could have sworn we had this already.
2015-09-22 20:25:14 +02:00
Fabian Homborg
c6d808a0d8 git completions: Switch more to string 2015-09-22 20:24:54 +02:00
Fabian Homborg
4f12821ca8 git completion: Rewrite __fish_git_ranges with the string stuff
Cuts down on perl.

Also complete heads (i.e. tags and branches) always.
2015-09-22 18:21:09 +02:00
Fabian Homborg
4fcda28d9b git completions: Add remote branches with only one remote
Fixes #675
2015-09-22 16:46:43 +02:00
Johannes Schneider
054fb22854 Maven completion added 2015-09-19 22:27:04 +02:00
Fabian Homborg
be70ea7d49 Add completion for Arch's mkinitcpio 2015-09-17 18:23:37 +02:00
Fabian Homborg
1ef178c5e6 Add alsactl completions 2015-09-17 18:20:23 +02:00
Fabian Homborg
56399b9aa3 systemctl completions: Show instanced services
This unfortunately requires us to do two systemctl calls, but it's still
pretty fast.
2015-09-17 18:16:56 +02:00
Fabian Homborg
a79c7495c8 busctl completions: Fix usermode
Block-scope strikes again!
2015-09-17 18:12:00 +02:00
Fabian Homborg
f86ee20579 systemctl completions: Support systemd in /lib
Debian has not merged /usr/lib and /lib, so they install the `systemd`
binary at /lib/systemd/systemd.

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=790671
2015-09-16 23:18:04 +02:00
Dan Underwood
18a116394d Complete atom package manager or apmd
Completions for `apm` now support both the Advanced Power Management client and the Atom text editor.
2015-09-16 15:54:42 +01:00
Konrad Borowski
094948db51 Fix issue with pkg --jail=value completion 2015-09-16 13:58:48 +02:00
Konrad Borowski
18c7e97ecc Add pkgng command completions
Fixes #1054.
2015-09-16 13:57:36 +02:00
Fabian Homborg
c8ac48ff9a Informative git prompt: Handle root/toor users
Fixes #961

This should probably be in a helper function
2015-09-15 21:14:49 +02:00
Fabian Homborg
7fe8a63f53 Webconfig: It's abbr --erase, not abbr --remove
This was renamed in c0cf25cf0b but never
in webconfig.
2015-09-13 22:35:32 +02:00
Fabian Homborg
48874294d6 Webconfig: abbr doesn't support "--"
Fixes #2276
2015-09-13 22:35:32 +02:00
Stefan Maric
527c932e93 Fix npm run completion executing only on completions load, also:
* Better handling of `npm run` output
2015-09-12 12:12:21 +02:00
Stefan Maric
cba3db6205 Remove redundant completions that lack descriptions for npm 2015-09-12 12:12:21 +02:00
Stefan Maric
3b798b1733 Make use of npm completion 2015-09-12 12:12:21 +02:00
Stefan Maric
f898d82536 Add script values as descriptions to npm run/run-script completion 2015-09-12 12:12:21 +02:00
Stefan Maric
3b5aab6edb Complete list of available scripts for npm run/run-script command 2015-09-12 12:12:21 +02:00
Fabian Homborg
31d1e04301 git completion: Don't check $cmd[1]
Before we do anything else, remove this senseless piece of code
2015-09-10 16:17:14 +02:00
Fabian Homborg
a828f90d38 git: Add more options for format-patch and submodule
Not all of them and only those that don't accept arguments for now

Fixes #1996
2015-09-10 15:22:16 +02:00
Fabian Homborg
00556734bc git completion: Ignore stderr for all commands
Might print unrelated crap if we try to complete while not in a git repository
2015-09-10 15:22:16 +02:00
Fabian Homborg
b231ab7238 Allow set_color options in general for linux VTs 2015-09-10 15:12:02 +02:00
Fabian Homborg
2587bbc4a7 rbenv completion: Remove trailing spaces 2015-09-10 15:10:25 +02:00
Fabian Homborg
40df11b162 Also allow bold, underline and printing colors in linux kernel VTs
bold works, printing colors doesn't change anything and underline
doesn't _break_.
2015-09-10 12:27:09 +02:00
Fabian Homborg
e9fcbb334e rbenv completion: Support ruby-build as plugin
Fixes #1028
2015-09-10 02:04:40 +02:00
Fabian Homborg
bffeb664cc Add __fish_sgrep
Missed in b85a8bb because of `git commit -a`.

Fixes #2372
2015-09-09 21:52:18 +02:00
Fabian Homborg
b85a8bbbfe Rename sgrep to __fish_sgrep
Makes it harder to cause issues with aliases, see fish-shell#2245
2015-09-09 20:55:04 +02:00
Fabian Homborg
925f451773 Add descriptions to dd completions
Fixes #752.
2015-09-09 19:40:58 +02:00
Jan Ernsting
7f28acc5ed Complete tags for git-tag only 2015-09-07 13:35:50 +02:00
Jan Ernsting
f36d2ff55f Ensure display of modified files for git commit 2015-09-07 13:35:34 +02:00
Jan Ernsting
396e01a0e0 Add missing description
git reset allows for files and branches as completion results
2015-09-07 11:05:47 +02:00
Jan Ernsting
787c1304c6 Add file completion for git-reset
Staged files are now offered for completion
2015-09-07 11:05:47 +02:00
Jan Ernsting
d92c08c9bb Add completion for git-commit
Modified files are provided for completion
2015-09-07 11:05:47 +02:00
Fabian Homborg
cb5511c8db Vcs prompt: Break if vcs isn't installed
Prevents an annoying error message.
Fixes #2363.
2015-09-06 14:58:09 +02:00
James
5e1c71b059 Added completions for entr 2015-09-02 13:59:25 +02:00
Fabian Homborg
f3695b95fc Use $VISUAL before $EDITOR in funced
Closes #2268
2015-09-02 13:55:59 +02:00
Fabian Homborg
5f080fcfc9 Load fish_user_key_bindings for any binding (including vi)
fish_user_key_bindings is the user's, and they should know if they want
vi-ish bindings or emacs-ish (or nano-ish). If they want to define
multiple, they can also do that (e.g. via checking what
$fish_key_bindings is set to).

Fixes #2254

CC @kballard
2015-09-01 11:50:50 +02:00
Fabian Homborg
a21e44c155 Add escape sequences for arrows in some linux VTs
Why this is only in some, I don't know, but these don't seem to
interfere with anything.

Fixes #2309
2015-09-01 11:46:54 +02:00
Fabian Homborg
60089f9750 Remove setup outside of fish_prompt from sample prompts
This doesn't work with fish_config.

For terlar and pythonista, remove unnecessary color setting.

For informative+git and pythonista, move variable setup into fish_prompt

Fixes #1141
2015-08-31 21:27:44 +02:00
Fabian Homborg
5043b9d06e Revert "Fix missing variable expansion $ in psub"
That change was a bit too eager as the mkfifo route doesn't currently work.

See #1040 and #2052.

This reverts commit a17b9fdaba.
2015-08-31 19:32:28 +02:00
Fabian Homborg
a17b9fdaba Fix missing variable expansion $ in psub 2015-08-31 19:24:48 +02:00
Fabian Homborg
2f3123e175 Make overriding cnf-handler work
See #1925: This allows users to disable the cnf-logic which can be quite
slow on small hardware (like a raspberry pi).

Squashed commit of the following:

commit 742a59e30d8db24b6bb5067d4204d4b5cc01c1c3
Author: Fabian Homborg <FHomborg@gmail.com>
Date:   Sun Aug 30 18:23:41 2015 +0200

    Erase startup cnf-handler early

    Simplifies the code a bit - in particular it removes the special-casing
    from the startup handler.

commit 638a97e7f31f302b65e044c93c638c03a69e31f5
Author: Fabian Homborg <FHomborg@gmail.com>
Date:   Mon Aug 24 20:14:46 2015 +0200

    Make overriding cnf-handler work

    Do this by renaming the __fish_command_not_found_handler used during
    startup to __fish_startup_command_not_found_handler. That allows us to
    check if __fish_command_not_found_handler has been defined and skip the
    setup of the normal one.

    Now disabling cnf-handling can be done via defining an empty
    __fish_command_not_found_handler in config.fish
2015-08-31 18:39:15 +02:00
Fabian Homborg
17c756971a Add a shell suspend function
Squashed commit of the following:

commit ede9e510751497d61ff0e78fd948e901171cf6f9
Merge: 938da30 239d2a2
Author: Fabian Homborg <FHomborg@gmail.com>
Date:   Thu Aug 6 18:47:43 2015 +0200

    Merge branch 'suspend' of https://github.com/mwm/fish-shell into suspend

commit 239d2a28e1
Author: Mike Meyer <mwm@mired.org>
Date:   Thu Aug 6 11:24:32 2015 -0500

    Handle interactive & login shells, SHLVL checks, and better message.

commit 6334047ebd
Author: Mike Meyer <mwm@mired.org>
Date:   Tue Aug 4 08:53:10 2015 -0500

    Add a description to suspend

commit 080458b31c
Author: Mike Meyer <mwm@mired.org>
Date:   Tue Aug 4 07:05:17 2015 -0500

    Add a shell suspend function
2015-08-30 18:42:35 +02:00
Fabian Homborg
f71e877f18 Improve situation for linux in-kernel VTs (TERM = "linux")
This adds a special colorscheme and prompt function guaranteed to work
on a VT and activates them automatically if $TERM = "linux".

set_color is overridden to only allow the 8 colors VTs have (under the
assumption those are always the same) and the color variables are
shadowed with global ones so they don't pollute our nice capable terms.
2015-08-30 18:30:03 +02:00
Annika Backstrom
d6c97a6a13 Fix spelling 2015-08-30 00:33:04 -04:00
Fabian Homborg
47b9993469 {prev,next}d-or-*-word: Fix for multiple lines
Fixes #2333
2015-08-26 21:30:04 +02:00
Fabian Homborg
7bfad18ec7 Make alt-arrow in iTerm2 do the same thing as elsewhere
nextd-or-forward-word and such

Fixes #1836
2015-08-25 13:49:40 +02:00