Commit Graph

1355 Commits

Author SHA1 Message Date
Fabian Homborg
8db1a5fae7 Add completions for Pulseaudio's pacmd
To implement this mostly as a wrapper around pactl, we add the list of
commands for this to that. It's 90% the same anyway. (This means that
`pactl suspend ` will complete files instead of commands like `pactl
banana ` would, but neither is correct)
2016-01-14 23:31:17 +01:00
Fabian Homborg
6bf70c86d2 Only complete unloaded modules for pactl load-module
This now officially does more than the official bash completion!
2016-01-14 22:36:50 +01:00
Fabian Homborg
b7d98fa873 Add profiles and ports completion to pactl
This is now on par with the official bash completions.
2016-01-14 22:21:50 +01:00
Fabian Homborg
daafe4ef37 Add completion for pulseaudio's pactl 2016-01-14 21:21:54 +01:00
Fabian Homborg
ed1919b266 abbr: Ensure we don't split on "=" if the given separator is " "
This fails on e.g. an abbr that uses `env a=b`, like the included test demonstrates.

Unfortunately it decreases the speed again (2s vs 2.2s vs 4s original),
but correctness is more important.
2016-01-14 16:58:29 +01:00
Fabian Homborg
ac545940de Optimize and modernize abbr
- Replace __fish_abbr_escape with `string escape`

- Don't double-parse the key

- Replace IFS magic with string

Together, this seems to speed it up by a factor of about 2.
2016-01-14 16:57:07 +01:00
Fabian Homborg
7a8cbcda06 Disable 24bit-color on neovim's terminal
Unfortunately, nvim will, even when running in a terminal that supports
it, swallow the sequences whole, rendering the displayed text _white_.

This means falling back to 256 colors is the lesser evil as at least a
blue-ish color will display as blue while a red-ish will be red, instead
of both showing white.

nvim's behavior does _not_ change depending on
$NVIM_TUI_ENABLE_TRUE_COLOR or any other option I could find and neovim-qt
exhibits the same behavior.

Fixes #2600.
2016-01-14 15:17:49 +01:00
Fabian Homborg
8e79da3b2d Fix typos
Fixes #2673.
2016-01-12 00:08:41 +01:00
Fabian Homborg
c56df11128 Add completions for kcmshell5
A tool to open KDE Plasma settings menus.
2016-01-09 18:58:03 +01:00
Fabian Homborg
6027eae1a1 Add completions for asp
A package information and build tool for archlinux, replacement for the
ageing "abs".
2016-01-09 18:58:03 +01:00
Fabian Homborg
bd482898d4 Simplify and stringify valgrind completions
These used _eval_ when a simple variable capturing would have sufficed.
2016-01-09 18:58:03 +01:00
Aurélien Deharbe
2a4f21cc92 Add completions for the haskell 'stack' build tool 2016-01-08 21:50:41 +01:00
Fabian Homborg
8cc213ed4f hg_prompt: Use string match -q instead of redirection 2016-01-08 14:10:03 +01:00
Fabian Homborg
4f519297dd Add new named colors to webconfig
The 'br' variants were added in 0a0acc8, but not to named_colors in
webconfig.py.

Fix this oversight.
2016-01-08 14:00:54 +01:00
Nathan Zadoks
92d0d98a24 Pass the full argv to the NixOS command-not-found handler
This patch is currently floated from the NixOS side as part of
https://github.com/NixOS/nixpkgs/pull/12000, but prior versions of the
hook ignore anything but the first argument anyway, so this is
backwards-compatible.
2016-01-03 14:32:12 +01:00
Fabian Homborg
8eca775977 hg prompt: Throw away string match input
This would print redundant characters
2015-12-31 14:21:37 +01:00
Fabian Homborg
c3971957ac hg prompt: Fix indentation 2015-12-31 14:21:37 +01:00
Fabian Homborg
9a7b2b190b hg prompt: Make display slightly nicer
The "/" between branch and bookmark might be mistaken for a path.

Parens (like the git prompt) make it look a bit more like a unit.
2015-12-31 14:21:37 +01:00
Fabian Homborg
6f2f0cfce2 Optimize hg prompt
Mainly replace hg calls since python is slow to start.
2015-12-31 14:21:37 +01:00
Fabian Homborg
3a249bb549 Include mount helpers in filesystem completion
Probably not a thing on OSX, but this should print nothing then.

On linux, it helps detect e.g. ntfs-3g.
2015-12-30 19:02:03 +01:00
Fabian Homborg
1a12071a48 Immediately define command-not-found handler
This skips the weird dance where we'd define a simple handler and then
later overwrite with a fancier one, once the first event came in.

It turns out that isn't necessary, as it doesn't actually improve
startup speed because the checks needed to define fancier handlers are fast.

In case we are non-interactive, still define the simple handler, and
keep the default handler for users to switch to.
2015-12-30 16:26:54 +01:00
Fabian Homborg
b7fb11cb7f git completion: Complete commits for all branches 2015-12-30 16:26:28 +01:00
Maxim Gonchar
95c30f7a23 Use \$ and \^ instead of their unicode codes 2015-12-30 12:49:44 +01:00
Maxim Gonchar
d5fe5c02a8 Update visual vi key bindings
* Add home/end, $/0 keys
* Add (c)hange key
* Add j/k keys for up/down
2015-12-30 12:49:44 +01:00
Fabian Homborg
759b45ad79 Remove temporary set_default function
This could potentially delete a user-defined set_default on first start.

It's also trivially done with set -q var; or set -U var val.
2015-12-30 12:49:44 +01:00
Fabian Homborg
834ebef53c Simplify greeting
We have already confirmed we're interactive, and `echo` is a builtin now.
2015-12-29 15:58:48 +01:00
Botond Erdos
bb932a0a0a adds dnf completions for package installs
Since dnf accepts the same arguments as yum, just inherit.
2015-12-29 14:48:09 +01:00
lordlycastle
f23c2beb61 Fixed kill-signals completion. Added completions for OS X kill command.
Don't generate killall completions when running on Solaris OS - `killall` there literally kills all processes.
2015-12-28 12:54:13 +01:00
Bogdan Sinitsyn
1a3bcf63bc Add database completion for pacman 2015-12-23 20:33:57 +01:00
Fabian Homborg
836b6bea73 git completions: Add commit hashes for show
That's probably the part where commit hashes are most used, we can add
the other subcommands later.

This generates a _lot_ of options, so hooking it up everywhere would be
unwise, though our pager helps quite nicely with filtering - typing
"Branch" will filter out the commits, and typing other things will
filter the subjects, which is quite cool.
2015-12-18 17:07:43 +01:00
Fabian Homborg
8a6f26ff9b Document prompt_pwd
Fixes #253
2015-12-17 15:25:13 +01:00
Fabian Homborg
5306fce16e mount completions: Support spaces in mountpoints
This turns '\040' into a space. /etc/mtab also supports other
escapes ("\\" for backslash, "\011" for tab), but I can't find
documentation for those in fstab.
2015-12-17 12:35:16 +01:00
Fabian Homborg
fb1a7d9d73 Port linux __fish_print_mounted to string
This adds a few escape sequences, but two out of the three are
theoretical and will fail a bit later.
2015-12-17 12:14:03 +01:00
Fabian Homborg
482cfca84f Make informative_git prompt use vcs_prompt -> Rename it to "Informative Vcs" 2015-12-16 19:05:28 +01:00
Fabian Homborg
e29d200ba5 Switch classic + git prompt to all vcsen -> Rename it to Classic + Vcs
Keep the variable names for now.
2015-12-16 19:05:28 +01:00
Fabian Homborg
43c7ababf9 Make lonetwin prompt use __fish_vcs_prompt 2015-12-16 19:05:28 +01:00
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