Commit Graph

1018 Commits

Author SHA1 Message Date
Jonas Damtoft
573c539956 Gradle-completions for gradle tasks (#3972)
* Implement https://github.com/hanny24/gradle-fish/blob/master/gradle.load

* Use XDG_CACHE_HOME

* Use __funced_md5

* Fix fish_md5.fish

* Actually use the new function.

* Use string match for matching tasks

* I goofed. Actually pass a string to complete -a

* Fix attempt to remove needed function...

* Fix regex

* Fix fish_md5.fish to use a flag
2017-05-13 13:28:32 +02:00
Fabian Homborg
573e1ad4b1 type: Remove TODO
[Ci skip]
2017-05-11 15:24:47 +02:00
Fabian Homborg
f5fac096c0 Don't move cursor in delete-char
Instead, move forward and backward in vi-mode.

Fixes #3899.
2017-04-28 22:53:03 +08:00
Fabian Homborg
77201ade34 __fish_complete_users: Also test for command, not path 2017-04-25 17:36:22 +02:00
Fabian Homborg
49d3a58a9e __fish_complete_users: Use command, not a hardcoded path 2017-04-25 12:47:23 +02:00
Kurtis Rader
37508d1f1e refactor the __*_users functions
Per my comment in issue #3980 this implements `__fish_print_users` in
terms of `__fish_complete_users` so we don't have to modify both when a
change to how users are enumerated is needed.
2017-04-23 20:08:40 -07:00
Christian Rondeau
bea0b17c9e Aucompletion guards for /etc/passwd #3980 2017-04-23 19:41:07 -07:00
Fabian Homborg
ec92e91ddc fish_clipboard_paste: Turn \r into \n
We already do this in bracketed-paste because it's really confusing to
have a \r literal in the commandline.
2017-04-23 13:40:40 +02:00
Fabian Homborg
cc7d83fa94 fish_clipboard_paste: Fix multiline pasting 2017-04-23 13:38:32 +02:00
Fabian Homborg
17ba21cfe4 Fix pasting backslashes
Another missing escape.

Fixes #3981.
2017-04-23 13:32:24 +02:00
Fabian Homborg
805a177673 __fish_config_interactive: Prefer python3
Also includes the CHANGELOG.
2017-04-21 13:45:49 +02:00
Fabian Homborg
e410d47565 fish_config: Pick a python
Also remove a use of `eval` and `string escape`.

Fixes #3970.
2017-04-21 13:45:49 +02:00
Fabian Homborg
7ef2d5e86f fish_update_completions: Pick a python
This removes a need for packagers to either patch our shebangs or pick
a particular python.

This was already done in __fish_config_interactive (where we need to
duplicate the code because it involves backgrounding).

Work towards #3970.
2017-04-21 13:45:49 +02:00
Kurtis Rader
b9d2e4d897 fix fish greeting regression
Fixes #3973
2017-04-20 20:17:50 -07:00
Francisco Giordano
349eff0df7 change cancel_commandline function to use color from variable
This allows the user to define how they want the "^C" rendered when a
pending command line is interrupted.
2017-04-17 21:16:42 -07:00
Ivan Trubach
a9db99ac52 Rename replace-one to replace_one
Fixes invalid character in variable name $fish_cursor_replace-one (used by fish_vi_cursor[_handle]) by renaming bind mode 'replace-one' to 'replace_one'.
2017-04-17 21:10:23 -07:00
Adam Byrtek
dd69ca5a81 Warn when function is not modified by the editor after calling funced (#3961)
* Check whether tmp file was modified in `funced`

* More idiomatic error messages

* Store the checksum in a local variable

* MD5 function supporting both GNU and BSD

* Use `else if` in MD5 function

* Use `string` builtin instead of `cut`
2017-04-17 17:18:02 +02:00
Kurtis Rader
dcc081a594 mark __fish_sgrep as deprecated
Fixes #2450
2017-04-15 21:51:33 -07:00
Kurtis Rader
75f1e36b44 a step to remove __fish_sgrep per issue #2450 2017-04-15 21:49:08 -07:00
Kurtis Rader
3463e81dda a step to remove __fish_sgrep per issue #2450 2017-04-15 20:04:43 -07:00
Kurtis Rader
0be8d0d385 another __fish_sgrep replacement 2017-04-13 23:14:36 -07:00
Kurtis Rader
da09a915f2 improve __fish_complete_directories function
Reviewing a PR for a completion script caused me to look at the
implementation for the `__fish_complete_directories` function. Which in
turn lead me to create this change to improve its implementation and add
unit tests for the function.
2017-04-11 13:45:53 -07:00
Kurtis Rader
75600b6b53 fix setenv and add unit tests
Fixes #3937
2017-04-05 15:31:13 -07:00
Kurtis Rader
62244f01c2 fix umask handling of symbolic modes
This fixes the handling of symbolic umask values. It also removes two
invocations of `perl` and all but two `math` commands.

Fixes #738
2017-03-28 16:28:24 -07:00
Fabian Homborg
4b9424eb20 type: Minor reformatting
Empty lines after `if` and `if begin`.
2017-03-28 15:55:10 +02:00
Fabian Homborg
c4d69ea8a1 type: Rewrite option parsing
Removes a call to `seq` and makes it a bit more readable.
2017-03-28 15:55:10 +02:00
Fabian Homborg
a3f28e221f type: Remove need for which
This should be completely equivalent without needing an external command.
2017-03-28 15:55:02 +02:00
Fabian Homborg
3d6c4adda9 Fix unescaped ' literals in bracketed-paste
This was a case of a missing \\.

Fixes #3913.
2017-03-26 09:33:11 +02:00
Fabian Homborg
70354f9f5e Add bind --list-modes option
Fixes #3872.
2017-03-20 16:42:53 +01:00
Kurtis Rader
536b1220fd cleanup __fish_complete_man.fish
I looked at this and noted some problems fixed by this change in
response to exploring if issue #726 was still unresolved.
2017-03-18 21:55:02 -07:00
Fabian Homborg
b6517250c7 vi-mode: \cd should do delete-or-exit
This just removes the special vi binding and hence falls back upon the
shared one.

Fixes #2219.
2017-03-17 12:07:10 +01:00
Fabian Homborg
99e87dded3 Auto-escape pastes inside single-quotes
This is to make pasting literals easier.

When a user pastes something, we normally take it as-is.

The exception is when a single-quote is open, e.g. the current token
is

    foo'bar

When something is pasted here, we escape single-quotes (`'`) and
backslashes (`\\`), so typing a `'` after it will turn it into a
literal token.

Fixes #967.
2017-03-16 16:08:13 +01:00
Kurtis Rader
6123d3cb50 document trap ... EXIT
Fixes #1180
2017-03-14 21:02:02 -07:00
Kurtis Rader
085a9b9267 fix stupid typo introduced by d9b30ab09 2017-03-14 13:17:53 -07:00
Kurtis Rader
d9b30ab090 setenv should behave like export
Fixes #3897
2017-03-14 12:14:22 -07:00
Fabian Homborg
db63be7909 Add support for bracketed paste
This is a terminal feature where pastes will be "bracketed" in
\e\[200~ and \e\[201~.

It is more of a "security" measure (since particularly copying from a
browser can copy text different from what the user sees, which might
be malicious) than a performance optimization.

Work towards #967.
2017-03-06 00:19:46 +01:00
Dan Zimmerman
f17ddb6770 Fix error when using tmux with vi mode 2017-02-28 19:05:05 +01:00
Kurtis Rader
9dd0c47d0b harden alias against foo; bar
If the first word of the alias body ends with a semicolon we need to
strip that character, and otherwise escape the extracted command, to
ensure the subsequent function definition is valid.

Fixes #3860
2017-02-20 20:23:55 -08:00
Fabian Homborg
0a8c922d92 Use command -sq instead of redirection
This option has been available for a while now and it's a bit shorter.
2017-02-18 22:16:55 +01:00
David Adam
40de253b3a Upgrade git:// and http:// URLs to https://
Work on fish-shell/fish-site#47

[ci skip]
2017-02-17 21:31:44 +08:00
Alan Somers
ad6ea1691e Fix "mount -t" completions on non-Linux OSes
AFAICT Linux alone uses the "mount.XXX" convention for mount helpers.
Illumos, Irix, HPUX, OSX, and the BSDs all use "mount_XXX".

Fixes issue #3841
2017-02-12 18:05:37 -08:00
Kurtis Rader
813415302a fix clear screen invocation
It's necessary to use a subcommand to eat the newline that `string
replace` appends to the string.
2017-02-12 14:12:12 -08:00
Clément Martinez
cbea0b9378 mount & udisksctl: improve -o completions` (#3764)
* mount & udisksctl: improve `-o` completions`

* Update __fish_complete_mount_opts
2017-02-12 15:23:41 +01:00
Markus Reiter
f38646593c Allow export to set colon-separated PATH, CDPATH and MANPATH. 2017-02-12 15:20:07 +01:00
Fabian Homborg
9598218a94 Don't call fish in the background to generate completions
Fixes #3803 even harder.
2017-02-12 14:56:36 +01:00
Fabian Homborg
afdd1a98c1 Don't clear scrollback with the \cl binding
ncurses since 6.0 sends the "E3" sequence along with "clear", even for
just `clear` or `tput clear`. This deletes the scrollback buffer which
is usually not what you want.

Fixes #2855.
2017-02-12 12:01:28 +01:00
Markus Reiter
3e35e6e488 Use string split in alias. 2017-02-10 14:09:41 +01:00
Kurtis Rader
0970cc8736 time for another make style-all 2017-02-07 21:52:35 -08:00
René Schwaiger
908ed493cc Fix wildcard bug in __fish_print_filesystems
Before this change the function `__fish_print_filesystems` would print
an error message about an empty wildcard match for the pattern
`$PATH/mount.*`, if the current operating system does not include any
helper binaries for the command `mount`. An example for such an OS is
the current version of macOS (version 10.12).
2017-02-06 08:08:54 -08:00
Rabah Meradi
a5e8b81ee3 Add completion for climate 2017-02-05 19:22:35 -08:00