Commit Graph

770 Commits

Author SHA1 Message Date
Julian Aron Prenner
fc21bb6eda Replace builtin 'bind_mode' with variable $fish_bind_mode 2014-01-15 12:04:52 +01:00
Maxim Gonchar
9684cbf850 Add optional options to fish_default_key_bindings
These options will be passed to the bind command.
Now it's possible to call
  fish_default_key_bindings -M insert
to set all original bindings to the insert mode
2014-01-15 15:26:38 +08:00
Maxim Gonchar
b0e94c15e6 Update vi bindings:
The following normal mode bindings are added:
    o, I, A, gg, G, g^, g$, x, X, backspace, d*, D, s, S, c*, C, ~, gu,
    gU, J, K, y*, Y, p, P

I was not able to add binding for 'O'

dd now deletes the whole line as vim, while D deletes the line to the
end. c, s, y act the same way
2014-01-15 00:21:13 +08:00
Julian Aron Prenner
874d3aca45 Make Ctrl+C exit insert mode, add some more backspace binds. 2014-01-14 15:24:26 +01:00
Julian Aron Prenner
dc90cd6bc4 Better input handling; add support multiple binding commands 2014-01-01 00:11:32 +01:00
Julian Aron Prenner
f408bc4808 Add sourceable script file to enable vi mode 2013-12-31 16:17:03 +01:00
Julian Aron Prenner
a302f37447 Fix bug 2013-12-31 16:16:28 +01:00
Julian Aron Prenner
f501e30353 Add sample prompt for vi mode 2013-12-31 14:56:12 +01:00
Julian Aron Prenner
2587649ca2 Allow restricting earsing and listing of bindings to specific mode;
implement force repaint and multi-char bindings;
2013-12-31 14:53:29 +01:00
Julian Aron Prenner
d1faac58dd Implement bind modes 2013-12-31 01:52:41 +01:00
David Adam
1efb120248 __fish_complete_svn: remove GNU extension options
Continuation of https://github.com/fish-shell/fish-shell/pull/1195/.
Removes use of --delimiter and --fields with cut(1) as these are GNU
extensions.

Note that a number of completions use these options, but as they are
only for GNU/Linux-specific tools have remained unmodified.
2013-12-30 12:32:24 +08:00
maxried
541db5fbbe Update adb.fish
Added semi-documented but often used adb subcommand.
2013-12-28 12:24:58 +01:00
Derek Li
93f7c14ea6 Math: disable bc multi-line output. 2013-12-26 18:32:36 +01:00
Andreas Eger
a3a918e900 adding elixir, iex, mix completions 2013-12-24 12:43:38 +08:00
Javier Gonel
12be83562d Non standard cut options
Some cut versions don't have `--delimiter` or `--fields` but use the standard options `-d` and `-f`
2013-12-18 18:02:19 +02:00
Konrad Borowski
5c96bca1ca Revert "Ensure that UTF-8 works if LANG contains it."
This was a really stupid change that I should have tested more
before pushing. It broke any non-interactive usage, such as SSH,
fish config, or parsing the script output, as config.fish is
loaded for everything.

There are no issues with different terminal emulators, so this
change will be pushed in the future, but only running in interactive
mode. I apologize for any issues caused by this commit.

This reverts commit d61adfbc53.
2013-12-17 20:47:14 +01:00
Konrad Borowski
d61adfbc53 Ensure that UTF-8 works if LANG contains it.
Some people like to have their terminals claim UTF-8 support when
their terminals actually are set to another encoding. As nobody
appears to understand this, I have made a change to automatically
fix the encoding problems if possible. This uses ISO 2022 sequences
in order to dynamically change the encoding.

Fixes #692. Fixes #895. Fixes possible future issues about this.
2013-12-15 11:08:15 +01:00
Jay Weisskopf
9bbda857c3 Prepend user paths even if they already exist in system path
Fixes #1099
2013-12-10 12:52:04 -05:00
Tom Sutcliffe
0e7acaa3c4 Added completion for Android adb command. 2013-12-05 10:43:44 +00:00
David Adam
f0946baeaa __fish_git_prompt: initialise colors early
Otherwise __fish_git_prompt_informative_status tries to expand an unset
variable.

Closes #1157.
2013-12-02 20:09:15 +08:00
Konrad Borowski
e1608362d0 Fix s/$remote// mistake.
$remote could have contained /.
2013-11-29 15:26:33 +01:00
Shane Xu
0e7790df8c add port information 2013-11-27 23:39:52 +08:00
Konrad Borowski
591abd340b Fix bold in informative git prompt.
Currently this fix is useless, as web config cannot apply variables,
but in future, it could be more useful.
2013-11-27 11:41:13 +01:00
Jelte Fennema
44d13869ad Add eselect, rc-update and rc-service completions. (These are utilities used by Gentoo Linux)
Disable php completion for the 4th part of the command, since php-eselect is differently designed and causes errors

Closes #1131.
2013-11-27 18:36:05 +08:00
Konrad Borowski
9862eb930d Use sed instead of sh for Informative Git Prompt.
Informative Git Prompt assumes that sh is bash compatible, but that's
not the case for FreeBSD. Fixes #1140.
2013-11-27 11:35:01 +01:00
David Adam
0c4dab54f1 __fish_complete_man: Use awk to parse output of apropos
Closes #960.

Uses pattern matching rather than OS detection. Works with BSD awk, GNU
awk and Solaris' nawk.
2013-11-27 17:58:43 +08:00
Misty De Meo
0a54558ee2 Update brew completion with new options 2013-11-26 00:45:13 -08:00
d10n
168d25e780 Do not open CLI browsers when using fish_config.
From the Python webbrowser documentation:
"If text-mode browsers are used, the calling process will block until the user exits the browser."

Running fish_config on an ssh server with no GUI browser will open a CLI browser which blocks and stops the server from handling requests.
Using multiprocess to run the server in the background lets CLI browsers access the page, but the page is unusable.

For now, disable CLI browsers and recommend opening the page in a graphical browser.
In the future, maybe write a CLI utility to change prompts and delete history items.
2013-11-26 00:41:09 -08:00
ridiculousfish
63a15e232b Fix indentation in __fish_complete_cd 2013-11-26 00:07:18 -08:00
Jörg Thalheim
cb86b8f8fc cd completion: handle not accessible directories 2013-11-26 00:04:31 -08:00
Siteshwar Vashisht
8fc26c1e58 Use fish from $__fish_bin_dir while calling fish_update_completions at startup 2013-11-17 16:24:00 +05:30
Siteshwar Vashisht
6eb7530f75 Do not show files in modprobe completions 2013-11-17 01:21:28 +05:30
Thierry Goettelmann
76ab22f74c Fix modprobe completion for newer modprobe versions 2013-11-16 20:13:41 +01:00
David Adam
14b6d32fe6 add bindings for PuTTY's I-can't-believe-it's-xterm keyboard
(see #170)
2013-11-13 11:20:59 +08:00
Siteshwar Vashisht
0de26732bf Don't show warning while generating man page completions on startup 2013-11-12 22:14:14 +05:30
Siteshwar Vashisht
0f02997bcc Autogenerate manpage completions in background if they do not exist 2013-11-12 22:14:14 +05:30
Konrad Borowski
ba2fcd9dae Use basename for man argument
This protects from providing paths to man, like `./a.out`.
2013-11-09 19:50:38 +08:00
Konrad Borowski
c0ad54fe02 Allow reading manpages by using F1. 2013-11-09 19:50:38 +08:00
Marc Joliet
fe3bca3a88 Prefer standard library lzma module if available
Prefer the standard library lzma module if available.  This change prevents
using the backports-lzma when it is installed for a version of Python that
already has the lzma module in its standard library.
2013-11-09 19:46:42 +08:00
Konrad Borowski
c5c59d4acb Implement file autocompletion for git add and git checkout.
Fixes bpinto/oh-my-fish#59.
2013-10-31 21:24:58 +01:00
Asger Hautop Drewsen
4a6592597a Make type -a print all executables in PATH 2013-10-29 13:32:14 +08:00
David Adam
edc4614e63 add completions for source and document the move away from '.'
Closes: #310
2013-10-28 23:33:24 +08:00
Konrad Borowski
e204ced1ae Disallow package names with dots.
They cannot be used as arguments (Perl thinks it's version check, but
version checks are pointless for oneliners), and Debian puts path
containing version depending directories (like 5.14.2) in Perl path.
2013-10-25 19:36:10 +02:00
Brian Gernhardt
59dd6678c3 git_prompt: Allow all set_color arguments
There is no need to explicitly check for two arguments and set --bold.
Instead the user can simply "set __fish_git_prompt_color_flags --bold
red".

The current check violates the expectation set by the documentation
that you can use any set_color argument as the current code interprets
"--bold red" as "--bold --bold" instead.

Plus, by passing the full contents of the variable directly, the user
can do more adventurous things like set the background as well.
2013-10-21 12:36:42 -04:00
Brian Gernhardt
137463dc6d git_prompt: Add upstream_prefix when verbose
git.git's git-prompt may not contain a configurable prefix, but it
does display a space before the upstream information when displaying
verbose information.  Rather than using a space always or never,
default to a space whenever verbose is in showupstream.
2013-10-21 12:34:14 -04:00
Brian Gernhardt
b652920500 git_prompt: optionally show upstream branch name
Adds a "name" option to __fish_git_prompt_showupstream that shows an
abbreviated branch name when the upstream type is verbose.

Based on git.git 1f6806c: git-prompt.sh: optionally show upstream
branch name
2013-10-21 12:08:43 -04:00
Konrad Borowski
2a6eb83fb4 Merge pull request #1015 from marcecj/add_bz2_lzma_xz_support
Support bzip2 and lzma/xz compressed man pages
2013-10-18 05:09:00 -07:00
Marc Joliet
6de9a92582 Change the way xz/lzma man pages are detected
This avoids the use of the global and puts the diagnostic message in a
self-contained location.
2013-10-17 12:12:04 +02:00
Ronaldo Maia
3788f462b4 Add postgres psql completion
Options and descriptions are from psql --help output. Database and username
completion based on the bash completion
2013-10-04 23:28:01 -07:00
Ronaldo Maia
238bbfcbbb Add postgres psql completion
Options and descriptions are from psql --help output. Database and username
completion based on the bash completion
2013-10-04 23:28:01 -07:00