Commit Graph

2891 Commits

Author SHA1 Message Date
mk2
0083555925 Move __fish_complete_abook_formats to abook 2019-08-04 15:20:32 +02:00
Shun Sakai
67cf50eda4 Added completions of languages developed by Microsoft
* csc, csi, vbc - .NET Compiler Platform (Roslyn)
* fsharpc, fsharpi - F# compiler and REPL environment
* tsc - TypeScript compiler
2019-08-03 14:47:59 -07:00
Klaus Alexander Seistrup
7046d251d9 Make sure nop command always suceeds 2019-08-03 18:14:12 +02:00
Frederik Gladhorn
ffcf5a5e03 completions/git: Add git cherry
See for example: https://git-scm.com/docs/git-cherry
git cherry is quite helpful when trying to findout if merges between
branches are complete, when there were cherry-picks in addition to
merges.
2019-07-24 16:02:30 +02:00
Fabian Homborg
9e6ae1cbef completions/git: Fix error with git config
This passed "--get" when it should have been "get".

Fixes #6000.

[ci skip]
2019-07-20 14:25:45 +02:00
adiabatic
6ca56fe0cb tmutil.fish: Add completions for local-snapshots subcommands (#5995)
* tmutil.fish: Add local-snapshot subcommands

* tmutil.fish: Add completion for thinlocalsnapshots

* tmutil.fish: Run fish_indent

* tmutil.fish: Remove duplicate destinationinfo
2019-07-17 08:40:15 +02:00
Fabian Homborg
ef403129e4 fish_vi_key_bindings: Remove duplicate \cc binding
Already done in the shared bindings.

[ci skip]
2019-07-15 21:04:23 +02:00
Fabian Homborg
33dbd98200 Remove x-bit from function 2019-07-15 21:02:08 +02:00
Fabian Homborg
56e122866c fish_svn_prompt: Shorten a return 2019-07-15 21:02:08 +02:00
Per Bothner
2dcaf4f5c0 Emit 'fish_cancel' at end of __fish_cancel_commandline.
This helps with shell integration - see issue #5973
"shell-integration - how distringuish winch repaint from ctrl-c cancel".
2019-07-15 21:01:49 +02:00
Fabian Homborg
47e9e8ab8a fish_vcs_prompt: Stop at first success
Closes #5980.
2019-07-15 17:32:22 +02:00
Mahmoud Al-Qudsi
7ee675afcf Update aws and aws s3 completions
Improve handling of switches interjected between the commands, and
support for completing buckets automatically for secondary+ parameters
to `aws s3`.
2019-07-11 21:22:25 -05:00
Peter Lithammer
9d47c46a7a Suppress shell function lookup for ssh during scp completion
This prevents functions or aliases to run during tab completion of
remote files for the `scp` command.
2019-07-08 22:12:44 +02:00
tomKPZ
42f38bb806 Fix status code coloring for nim prompt 2019-07-07 19:36:17 +02:00
Leonard Hecker
ca5427865d Fixed invalid assignments in fish_print_git_action 2019-07-03 17:37:44 +02:00
Tim Riley
d1be300ac7 Emulate path_helper more faithfully when constructing paths on macOS
Previously, elements already existing in the path variable would keep their position when the path was being constructed from the config files. This caused issues given that $PATH typically already contains "/usr/bin:/bin" when fish initializes within a macOS terminal app. In this case, these would keep their position at the front of the $PATH, even though the system path_helper configs explicitly place them _after_ other paths, like "/usr/local/bin". This would render binaries in "/usr/local/bin" as effectively "invisible" if they also happen to live in "/usr/bin" as well. This is not the intended

This change makes the __fish_macos_set_env config function emulate the macOS standard path_helper behavior more faithfully, with:

1. The path list being constructed *from scratch* based on the paths specified in the config files
2. Any distinct entries in the exist path environment variable being appended to this list
3. And then this list being used to *replace* the existing path environment variable

The result, for a vanilla fish shell on macOS, is that the $PATH is now set to:

    /usr/local/bin /usr/local/sbin /usr/bin /bin /usr/sbin /sbin

Where previously it was set to:

    /usr/bin /bin /usr/local/bin /usr/sbin /sbin

This new $PATH exactly matches the order of paths specified in `/etc/paths`.
2019-07-02 22:17:46 +02:00
Fabian Homborg
c392a05db0 functions/__fish_anypython: Also try python{3,2}.7
NetBSD!!!!! *shakes fist*
2019-06-25 19:40:22 +02:00
Fabian Homborg
427a18c1ea fish_git_prompt: Add a way to use the informative chars
$__fish_git_prompt_use_informative_chars will use the informative
chars without requiring informative mode (which is really frickin'
slow!).

See #5726.

[ci skip]
2019-06-25 16:11:18 +02:00
Fabian Homborg
3bc392a6b3 functions/__fish_print_hostnames: Check getent's status
This previously effectively checked `string split ' '`s return status,
which was false if it didn't split anything. And while that should be
true if getent fails (because it should produce no output), it's also
true if it doesn't print a line with multiple aliases. Which should be
fairly typical.

Instead we use our new-found $pipestatus to check what getent returns,
in the assumption that it'll fail if it doesn't support hosts.

Follow up to 8f7a47547e.

[ci skip]
2019-06-25 08:40:31 +02:00
Fabian Homborg
8f7a47547e functions/__fish_print_hostnames: Don't run getent hosts twice
`getent hosts` is expensive-ish - ~50ms, so we don't want to run it
twice just to figure out it works.

Apparently this works everywhere but CYGWIN and possibly older
OpenBSD, but we don't want to explicitly blacklist those.

[ci skip]
2019-06-24 19:19:31 +02:00
Shun Sakai
e7b42615c8 Add FFmpeg completions (#5922)
* Add FFmpeg completions

* Fix to use builtin command
2019-06-23 16:40:26 +02:00
Lily Ballard
fe2ec1e4f8
Merge pull request #5943 from lilyball/string_collect
Add new `string` subcommand `string collect`
2019-06-22 00:30:20 -07:00
infix
ae2c40ebdb Updated DNF auto completion 2019-06-21 09:24:37 -07:00
Lily Ballard
181e44d331 Invert the flag for string collect
Instead of requiring a flag to enable newline trimming, invert it so the
flag (now `--no-trim-newlines`) disables newline trimming. This way our
default behavior matches that of sh's `"$(cmd)"`.

Also change newline trimming to trim all newlines instead of just one,
again to match sh's behavior.
2019-06-16 16:40:14 -07:00
Lily Ballard
b41e5cbbb7 Add string collect
The `string collect` subcommand behaves quite similarly in practice to
`string split0 -m 0` in that it doesn't split its output, but it also
takes an optional `--trim-newline` flag to trim a single trailing
newline off of the output.

See issue #159.
2019-06-16 15:51:57 -07:00
Fabian Homborg
b4792bde19 Remove brew completions
Leave a note in place

Fixes #5892.

[ci skip]
2019-06-12 20:42:20 +02:00
Fabian Homborg
77103ddbab Dishonour
[ci skip]
2019-06-12 10:22:46 +02:00
Fabian Homborg
c0ca4d3236 functions/history: Read the search term if none is given
Fixes #5791.
2019-06-06 15:07:46 +02:00
Shun Sakai
c566756f3b Fix long option name of zypper 2019-06-03 16:36:03 +02:00
Fabian Homborg
f9f30e6a8e completions/rsync: Fix "=THING"
This included stuff like `--max-size=SIZE`. Weird that nobody noticed?

[ci skip]
2019-05-30 21:41:58 +02:00
Fabian Homborg
cd2b1b99e8 completions/rpm: Complete files for -qf
Fixes #5127.

[ci skip]
2019-05-30 19:27:41 +02:00
Fabian Homborg
df6f3fdcf4 completions/pacman: Fix pacman -Qo
(also yaourt)

[ci skip]
2019-05-30 19:20:06 +02:00
Fabian Homborg
430b2a48a9 completions/sudo: Fix sudo -e
This uses the new "--force-files" flag.

Fixes #5646.

[ci skip]
2019-05-30 19:14:33 +02:00
Fabian Homborg
d0921489ee fish_git_prompt: Fix changing show_informative_status
If you changed $__fish_git_prompt_show_informative_status, it
triggered a variable handler, which erased the chars, but neglected to
unset $___fish_git_prompt_init, so we just kept chugging along with
empty characters.

What's the hardest thing in CS again? Cache something something?

[ci skip]
2019-05-29 10:36:14 +02:00
Fabian Homborg
6d66c47f70 completions/fish: Add FLOG additions
[ci skip]
2019-05-28 22:43:37 +02:00
Fabian Homborg
d46dacdfee Stop abusing __fish_complete_suffix to complete dirs
[ci skip]
2019-05-27 19:37:28 +02:00
Fabian Homborg
dcf017ff57 fish_complete_directories: Use complete -C
This way we use our core file completion code, which is much more
flexible than we can easily achieve directly in script (which would
require e.g. an `expand` builtin, and case-insensitive globs).

Fixes #5896.
2019-05-27 19:33:52 +02:00
Fabian Homborg
261198aa3e completions/set: Complete some config vars even if they aren't set
Fixes #5884.

[ci skip]
2019-05-21 17:00:32 +02:00
Fabian Homborg
7ddae68645 Restyle a few stragglers
THERE WERE TABS! TABS!

TABS!

[ci skip]
2019-05-20 21:07:37 +02:00
ridiculousfish
3d25ce1fd4 Merge remote-tracking branch 'takoyaki/ant_completion' into master 2019-05-11 23:22:45 -07:00
Fabian Homborg
c27c8801af completions/git: Put local branches before unique remotes
With a few remotes, unique remote branches can get quite large, and
you probably mostly work on your own.

[ci skip]
2019-05-11 12:43:05 +02:00
Fabian Homborg
816df47c10 fish_clipboard_paste: Only trim leading whitespace on first line
We remove leading spaces so a paste isn't histignored, but we did so
on all lines, which removed indentation.

[ci skip]
2019-05-11 11:19:21 +02:00
Fabian Homborg
50ed5126f1 completions/git: Reorder some completions with --keep-order
They are displayed in LIFO-order, so it makes sense to e.g. put the
recent commits close to last (only before files) for `checkout`.

Fixes #5868.
2019-05-10 15:36:41 +02:00
Fabian Homborg
cc205a134b Disable fish_title in emacs 2019-05-06 17:06:40 +02:00
Fabian Homborg
afff93bdb2 Disable vi-cursor in tests
Otherwise this breaks if run inside a terminal that could do the cursor.
2019-05-05 17:31:33 +02:00
Fabian Homborg
d83636f70e completions/git: Handle AD files
Added files that were deleted after. These count as both added and
deleted.

Fixes #5861.

[ci skip]
2019-05-05 13:49:11 +02:00
Fabian Homborg
bcce6d691f Keep "; and" and "; or" on fish files
This reformats *.fish files from before commit
c2970f9618 with the changes to fish_indent.

[ci skip]
2019-05-05 13:34:38 +02:00
Fabian Homborg
46b804cf19 fish_vi_cursor: Don't fail if --force-iterm is given in non-iterm
Otherwise this would have used it as the terminal.

Fixup!

[ci skip]
2019-05-05 13:05:19 +02:00
Fabian Homborg
e952f60b02 functions/fish_vi_cursor: Disable on iTerm, allow override
I still don't get #3696, so let's just offer an override for now.

[ci skip]
2019-05-05 13:01:02 +02:00
Fabian Homborg
7451443050 functions/fish_vi_cursor: Cleanup
Removes the unused "uses_echo" variable and adds some comments.

[ci skip]
2019-05-05 12:57:14 +02:00