Commit Graph

11093 Commits

Author SHA1 Message Date
ridiculousfish
424c56006d Add a paranoid assert to io_chain_t::append 2019-11-10 13:31:47 -08:00
ridiculousfish
f2093aef43 Remove io_chain_t::push_front
It was unused.
2019-11-10 13:25:55 -08:00
ridiculousfish
87f4f33600 Remove vars parameter from function_exists_no_autoload
This variable was unused.
2019-11-10 13:13:56 -08:00
Z. Grace Moreau
012a3137df update CHANGELOG 2019-11-10 22:19:15 +01:00
Z. Grace Moreau
35bc811310 add completions for plutil 2019-11-10 22:19:15 +01:00
Sam Yu
ffb4f7a4ff Update zypper completion
- update options to the newest version
- re-format and align
2019-11-10 22:17:00 +01:00
ridiculousfish
2555ecf757 Remove the forbidden function stack
Detect forbidden functions directly from the associated block_t.
Also unify where we do stack overflow detection.
2019-11-10 12:36:46 -08:00
ridiculousfish
626237c9c3 Add a check for fish function stack overflow 2019-11-10 12:35:58 -08:00
ridiculousfish
7bd134f795 Reformat all .cpp files 2019-11-09 16:07:33 -08:00
Clément Martinez
82227b8854 Add apt install --reinstall completion 2019-11-09 22:40:20 +08:00
ridiculousfish
896ef65f8c Rename error_offset to error_offset_within_token
Hopefully clarify the role of this variable.
2019-11-08 16:56:50 -08:00
ridiculousfish
ef8b5e4fa0 Correct certain tokenizer error reporting for unclosed subshells
There was some confusion about the different pointers and offsets
in tokenizer_t::call_error.

Fixes #6281
2019-11-08 16:56:43 -08:00
ridiculousfish
eb2386f3e3 Rename tokenizer_t::buff to token_cursor
That should clarify its role vis-a-vis 'start'.
2019-11-08 16:56:18 -08:00
David Adam
41c42c86e3 travis: remove superfluous CXXFLAGS
Discussion in #6296.
2019-11-09 07:43:51 +08:00
Johannes Altmanninger
270fd14b00 Fix typo
[ci skip]
2019-11-08 11:40:03 +01:00
Johannes Altmanninger
0e4a75c0b5 Do not print greeting with empty $fish_greeting and --private
Fixes #6299

[ci skip]
2019-11-08 11:09:33 +01:00
Johannes Altmanninger
5c3e43bc0c vi mode: make return key in replace mode insert a newline
Fixes #6298

[ci skip]
2019-11-08 10:51:58 +01:00
ridiculousfish
7f59a7e7cf Only dispatch variable changes for the principal variable stack or globals
fish will react to certain variable modifications, such as "TZ." Only do
this if the main stack is modified. This has no effect now because there
is always a single stack, but will become important when concurrent
execution is supported.
2019-11-07 23:15:35 -08:00
ridiculousfish
8f3d745e60 Teach env_stack_impl_t to report whether it modifies a global
This will help in limiting variable dispatch changes to global and
principal modifications.
2019-11-07 23:15:35 -08:00
Johannes Altmanninger
d242ff1808 Add description for automatic fish_update_completions job
See #6269
2019-11-07 23:33:35 +01:00
Johannes Altmanninger
e94b9ccf3e Do import bash history commands containing && or || 2019-11-07 23:33:35 +01:00
Johannes Altmanninger
1cfa3fa819 Speed up import of bash history
Fixes #6295
2019-11-07 23:33:35 +01:00
Collin Styles
422e2dcbdd Add completions for rustup doc
[As of rustup 1.20][1], users can give a topic as an argument to `rustup
doc` to open the relevant documentation page in a browser. This commit
adds completions for these topics to assist users in finding what
they're looking for.

[1]: https://blog.rust-lang.org/2019/10/15/Rustup-1.20.0.html#improvements-to-rustup-doc
2019-11-07 18:48:19 +01:00
Johannes Altmanninger
35115d3d54 __fish_print_help: do not read $LESS 2019-11-07 17:45:54 +01:00
Johannes Altmanninger
08eac28bd8 Add individual documentation pages for string's subcommands
This adds string-x.rst for each subcommand x of string. The main page
(string.rst) is not changed, except that examples are shown directly after
each subcommand.  The subcommand sections in string.rst are created by
textual inclusion of parts of the string-x.rst files.

Subcommand man pages can be viewed with either of:

```
man string collect
man string-collect
string collect <press F1 or Alt-h>
string collect -h
```

While `string -h ...` still prints the full help.

Closes #5968
2019-11-07 09:54:25 +01:00
Fabian Homborg
6050ccbb02
Merge pull request #6294 from ChristopherRogers/patch-1
Fix typo in git clean completion
2019-11-07 07:53:15 +01:00
Christopher Rogers
b089a579bd
Fix typo in git clean completion 2019-11-07 15:32:43 +09:00
Jakub Darul
3b4234a9de added d0 to vi keybindings 2019-11-06 18:18:43 +01:00
James Stidard
16bf98f928 Fix: equality vs identity
Changes identity `is` for equality `==` check. To remove python warnings when updating auto complete

```
/usr/local/Cellar/fish/3.0.2/share/fish/tools/deroff.py:770: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if len(comps) is 2:
/usr/local/Cellar/fish/3.0.2/share/fish/tools/deroff.py:954: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if len(comps) is 2:
Parsing man pages and writing completions to /Users/james/.local/share/fish/generated_completions/
  6155 / 6155 : zic.8
```
2019-11-06 14:13:21 +08:00
Johannes Altmanninger
939d4674e4 Do not compute $history in builtin set.
Most uses of set don't care about the value of $history, and it
can be expensive to compute.

See #6290
2019-11-05 16:53:06 +01:00
David Adam
e1e82ecd40 CHANGELOG: work towards 3.1.0
Up-to-date to eac9ec90.

[ci skip]
2019-11-05 21:50:05 +08:00
Johannes Altmanninger
04c912e0e3 Fix typo, closes #6289
[ci skip]
2019-11-05 13:32:41 +01:00
Johannes Altmanninger
23eb6e9c09 Don't compute $history for variable completion description
Fixes #6288
2019-11-05 13:06:52 +01:00
Johannes Altmanninger
4f1fa9513c Make most subcommand completions take external commands only
Also fix ssh completions which were broken by
277fca9c6a.
2019-11-05 11:47:05 +01:00
David Adam
d8b305d6e4 README.md: add dependency on tee
Required for psub to work correctly.

[ci skip]
2019-11-05 18:06:20 +08:00
Johannes Altmanninger
277fca9c6a Complete all available commands on empty commandline 2019-11-05 09:50:37 +01:00
Johannes Altmanninger
4c73382231 Fix function definitions potentially leaking as completions 2019-11-05 09:50:37 +01:00
Johannes Altmanninger
36693e4391 Complete empty subcomands consistently
If the command is empty, try to complete starting from the empty command
instead of the whole commandline.
2019-11-05 09:05:46 +01:00
Johannes Altmanninger
12e783e30e sphinx docs: put search box above TOC
Makes it visible without having to scroll down.
[ci skip]
2019-11-05 08:47:06 +01:00
Johannes Altmanninger
afb56a007d Fix completions for env
Fixes #5306
2019-11-05 08:44:04 +01:00
Fabian Homborg
e893c8ca97 Revert "Set fish_clipboard_paste handler once on startup"
This reverts commit f620ddf03b.

Setting the paste handler isn't performance-sensitive.

On the other hand setting it this way makes things less transparent,
less flexible (if e.g. a paste handler is installed while the shell is running),
and causes #6286.

Fixes #6286.

[ci skip]
2019-11-04 20:47:58 +01:00
Fabian Homborg
e68c24beff docs/tutorial: Fix formatting
This removes the explicit html coloring that was used in the tutorial.
Where necessary we just add pseudo-html like `<red>...</red>` to
explain it to the users.

I don't know how to reintroduce coloring here, but it's not super
important as the user can always just check for themselves.

See #5696

[ci skip]
2019-11-04 20:08:45 +01:00
Fabian Homborg
d77c465d23 string: Allow -eq again
Instead of forbidding it for both modes, allow it for both and make it
quiet for string.

Fixes #6282
2019-11-04 17:34:37 +01:00
Johannes Altmanninger
6fb7f9b6b8 Fix completion for builtins (with subcommands)
Presently the completion engine ignores builtins that are part of the
fish syntax. This can be a problem when completing a string that was
based on the output of `commandline -p`.  This changes completions to
treat these builtins like any other command.

This also disables generic (filename) completion inside comments and
after strings that do not tokenize.

Additionally, comments are stripped off the output of `commandline -p`.

Fixes #5415
Fixes #2705
2019-11-04 16:44:51 +01:00
David Adam
5f99ec7eae Merge branch 'changelog' of git://github.com/faho/fish-shell into faho-changelog 2019-11-04 22:53:40 +08:00
LawAbidingCactus
19b59fc54e minor fixes to version-specific completions 2019-11-03 21:37:57 +08:00
ridiculousfish
47c0b5f931 Simplify history searching and fix deduplication
The history search logic had a not very useful "fast path" which was also
buggy because it neglected to dedup. Switch the "fast path" to just a
history search type which always matches.

Fixes #6278
2019-11-02 19:33:45 -07:00
ridiculousfish
52e900690b Make history_search_type_t an enum class 2019-11-02 18:56:16 -07:00
ridiculousfish
be35b858c5 Minor allocation reduction in format_history_record
Reuse some storage across calls.
2019-11-02 18:35:19 -07:00
ridiculousfish
72bf5898d3 Clean up how PATH and CDPATH munging occurs
PATH and CDPATH have special behavior around empty elements. Express this
directly in env_stack_t::set rather than via variable dispatch; this is
cleaner.
2019-11-02 16:48:08 -07:00