Commit graph

10881 commits

Author SHA1 Message Date
Z. Grace Moreau
ff2baf2591 add completions for Visual Studio Code CLI tool 2019-10-15 13:05:08 -07:00
Bruno Heridet
38eb7129d3 doc: add links to bg, fg and jobs in disown command
[ci skip]
2019-10-15 12:57:01 -07:00
ridiculousfish
35671dd9f0 Clean up and unify pipes and redirections
This cleans up how pipes and redirections are recognized by the parser,
and unifies pipes and redirections into a single type.
2019-10-15 11:26:41 -07:00
Johannes Altmanninger
2d2e15b63d Silently ignore recursive calls to complete -C without parameter
In e167714899 we allowed recursive calls
to complete. However, some completions use infinite recursion in their
completions and rely on `complete` to silently stop as soon as it is
called recursively twice without parameter (thus completing the
current commandline). For example:

complete -c su -s -xa "(complete -C(commandline -ct))"
su -c <TAB>

Infinite recursion happens because (commandline -ct) is an empty list,
which would print an error message.  This commmit explicitly detects
such recursive calls where `complete` has no parameter and silently
terminates.  This enables above completion (like before raising the
recursion limit) while still allowing legitimate cases with limited
recursion.

Closes #6171
2019-10-15 13:36:28 +02:00
Johannes Altmanninger
cf3b24cf62 fix typo 2019-10-15 13:30:21 +02:00
Mark Stosberg
087500e7b9 doc: document relative path support for source.
[ci skip]
2019-10-14 18:58:30 +02:00
Aaron Gyes
d1970c7f2e read_ni: be more specific in error if a file can't be read
for example, `fish /etc` now tells us "Is a directory"

make a couple char constants wchar_t constants
2019-10-14 01:43:35 -07:00
Aaron Gyes
5d84d3fe48 reader.cpp: remove unused pointer in read_ni
literally prehistoric in git blame
2019-10-14 00:42:03 -07:00
ridiculousfish
4b6de8b4a3 Clean up a stale comment. 2019-10-13 23:05:55 -07:00
ridiculousfish
c160492d42 Remove tok_t::redirected_fd
This wasn't used for anything.
2019-10-13 23:04:18 -07:00
ridiculousfish
1a65e18ba8 Clean up some tokenization
Remove TOK_NONE
Turn token_type into an enum class
Make next() turn a maybe_t<tok_t> instead of a bool
2019-10-13 16:06:16 -07:00
ridiculousfish
82eca4bc86 Run clang-format on all files
The main change here is to reorder headers.
2019-10-13 15:50:48 -07:00
ridiculousfish
e73e9c3e2e Ensure that clang-format places config.h first in header list 2019-10-13 15:45:02 -07:00
Andy
39671e6b19 Fix ranger options: choosefile(s), choosedir
Source <ee344c896e/ranger/core/main.py (L293-L303)>
2019-10-13 12:14:08 -07:00
Sergei Morozov
478f54c035 Added PHPUnit shell completion 2019-10-13 12:13:34 -07:00
Per Bothner
d502ad2c25 Prefer using clr_eos to clear "remaining lines"
This is both more efficient than multiple clr_eol sequences,
and also works better with shell-integration.
2019-10-13 12:12:44 -07:00
Delapouite
09a97528a9 doc: add cross-refs between if and else commands 2019-10-10 18:17:10 +02:00
Clément Martinez
1f35b146de Add grub-mkrescue completions 2019-10-10 18:16:32 +02:00
aca
8c5aca599f completions/fzf: completion for fzf 2019-10-10 18:16:00 +02:00
Aaron Miller
15ed682bfa Fix options after --argument-names to function (#6188)
This stops reading argument names after another option appears. It does not break any previous uses and in fact fixes uses like

```fish
function foo --argument-names bar --description baz
```

* `function` command handles options after argument names (Fixes #6186)

* Removed unneccesary test
2019-10-10 18:09:26 +02:00
jalr
3d1e9423c2 cd: Add test for changing to a dir starting with a - char 2019-10-10 18:06:11 +02:00
jalr
2e6ab0b418 cd: Fix test for too many args 2019-10-10 18:06:11 +02:00
Greg Anders
055a332133 Only print extra newlines for multi-line prompts (#6179)
Corrects #6110

BSD `seq` produces a down-counting sequence when the second argument is
smaller than the first, e.g.:

    $ seq 2 1
    2
    1
    $

While GNU `seq` produces no output at all:

    $ seq 2 1
    $

To accommodate for this behavior, only run `seq` when we are sure that
the second argument is greater than or equal to the first (in this case,
the second argument `line_count` should be greater than 1).
2019-10-08 19:14:51 +02:00
Fabian Homborg
ff18b2a09a Fix tests
This didn't account for the path differing from when I ran the test
manually.

Sorry!
2019-10-08 19:12:56 +02:00
Bruno Heridet
7dbbd16d0a doc: add missing down-line and up-line (#6177)
[ci skip]
2019-10-08 18:01:32 +02:00
Fabian Homborg
a7913c3a10 function: Reject invalid variable names for --argument-names
Fixes #6147.
2019-10-07 21:26:41 +02:00
matoruru
422441e903 Add completions/sfdx.fish (#6149)
* Add completions/sfdx.fish

* completions/sfdx.fish: add completion for options

* completions/sfdx.fish: add a completion for --manifest(-x) option which need package.json

* completions/sfdx.fish: replace redundant function with already existing one
2019-10-07 17:32:56 +02:00
Bruno Heridet
9c651d7db0 doc: add link to feature flags in fish command
[ci skip]
2019-10-07 17:15:39 +02:00
Johannes Altmanninger
f91c725ff0 Fix caret position of invalid expansion in command position
Fixes #5812
2019-10-06 13:43:05 -07:00
ridiculousfish
e2952f230b Revert #6139
Revert "gut gpg.fish/gpg1.fish/gpg2.fish; migrate functionality to __fish_complete_gpg.fish"

This reverts commit d558218d03.

Revert "break version-specific completions out into independent function;"

This reverts commit 9160e77b01.

Revert "split gpg2- and gpg1-specific completions to conditional block"

This reverts commit a069b95f63.
2019-10-06 12:35:07 -07:00
LawAbidingCactus
d558218d03 gut gpg.fish/gpg1.fish/gpg2.fish; migrate functionality to __fish_complete_gpg.fish 2019-10-06 12:31:42 -07:00
LawAbidingCactus
9160e77b01 break version-specific completions out into independent function;
document changes
2019-10-06 12:31:42 -07:00
LawAbidingCactus
a069b95f63 split gpg2- and gpg1-specific completions to conditional block
This allows gpg.fish to account for both gpg versions.
2019-10-06 12:31:31 -07:00
Johannes Altmanninger
9b86d5dd16 Export all local exported variables in a new scope
Fixes #6153
2019-10-06 12:10:21 -07:00
Per Bothner
afb8f42f39 Emit omitted-newline string before fish_prompt event
See issue #6118 "omitted-newline string emitted after fish_prompt event"
2019-10-06 10:52:12 -07:00
Per Bothner
dfc45f3e10 Clear line if new indentation greater than old.
Make sure initial indentation is skipped, rather than written as spaces.
This is a tweak to pull request #5928.
2019-10-06 10:34:55 -07:00
Fabian Homborg
eca1fcad90 CHANGELOG: Document the new binding changes
[ci skip]
2019-10-06 15:38:11 +02:00
Fabian Homborg
8bc44b2bff CHANGELOG: Introduce sub-headers for interactive improvements
These are just too many and too different to keep them under one heading.
2019-10-06 15:31:58 +02:00
Fabian Homborg
e5c84e63b6 Document prepend-sudo
[ci skip]
2019-10-06 15:22:25 +02:00
Greg Anders
0f802eaad8 Add default \es keybinding for "prepend sudo" 2019-10-06 15:17:49 +02:00
Greg Anders
e5fc8abefe Fix default Alt+W keybinding (#6110)
* Fix default Alt+W keybinding

The old keybinding would chop off the last line of the `whatis` output
when using a multi-line prompt. This fix corrects that.

* Make variable local and remove unneeded if statement

* Test that token is non-empty
2019-10-06 15:14:10 +02:00
madblobfish
87dee7ad1c improved ansible-vault completions 2019-10-06 15:13:06 +02:00
Kon Doumou
e44d207d64 sudo keywork is ignored when alt+h is pressed
if `sudo` is in the beggining of the command string, then at alt+h press
the manual of the following command is shown instead.

Fixes https://github.com/fish-shell/fish-shell/issues/5982
2019-10-06 15:12:02 +02:00
Bruno Heridet
26adff3378 doc: add link to event handlers in emit
[ci skip]
2019-10-06 15:09:01 +02:00
domdom
0fdad2dd6a doc: mention history prefix search binds in binds.rst
Mention history-prefix-search-forward and history-prefix-search-backward in
binds.rst
2019-10-06 15:03:11 +02:00
Johannes Altmanninger
7017a2fcf9 Unexpand abbreviations' variable names before completing them
Fixes #6166
2019-10-06 14:42:42 +02:00
Sergei Morozov
1602902e12 Improved shell completion for Composer
1. Added missing commands and arguments.
2. Removed alternative spelling of some commands (e.g. clear-cache|clearcache) since a choice of spelling is not really useful for completion.
3. Fixed a typo: np-ansi → no-ansi.
4. Removed redundant backslash in front of $COMPOSER_HOME.

The updated completion was initially generated using the bamarni/symfony-console-autocomplete package and then incorporated into the existing code.
2019-10-05 12:54:20 -07:00
domdom
76f4b65981 Add prefix history search 2019-10-05 11:27:32 -07:00
David Adam
9516fa5017 complete: document change in 22ce8c23c6 2019-10-04 07:13:17 +08:00
David Adam
75bd821495 CHANGELOG: minor work on 3.1.0 2019-10-04 07:11:04 +08:00