Commit Graph

11302 Commits

Author SHA1 Message Date
Robin Linden
34e06c4440 Remove overrides of default CMake flags
CMake sets these flags to sane defaults depending on which compiler
you're using, so overriding them isn't very nice.

For example:

with g++, I get
-- Debug: -g
-- RelWithDebInfo: -O2 -g -DNDEBUG
-- MinSizeRel: -O2 -g -DNDEBUG
-- Release: -O3 -DNDEBUG

and with MSVC you get something like
-- Debug: /MDd /Zi /Ob0 /Od /RTC1
-- RelWithDebInfo: /MD /Zi /O2 /Ob1 /DNDEBUG
-- MinSizeRel: /MD /Zi /O2 /Ob1 /DNDEBUG
-- Release: /MD /O2 /Ob2 /DNDEBUG
2019-11-13 13:02:05 -08:00
ideal
8aaccf1587 Reduce times of move and copy operation 2019-11-12 14:58:22 -08:00
Johannes Altmanninger
e37bb0721d completions/git: fix typo in deleted-staged files
Fixes #6315
2019-11-12 21:40:13 +01:00
ridiculousfish
ec08a50769 Eliminate function_data_t
This struct is now mostly useless and can go.
2019-11-12 11:25:41 -08:00
ridiculousfish
6d7a66592b Make function_add take the filename directly instead of a parser 2019-11-12 10:00:42 -08:00
ridiculousfish
b51edcfcac Simplify function_info_t and function_data_t
Work towards cleaning up function definition. Migrate inherit_vars into
props and capture their values at the point of definition.
2019-11-12 09:53:10 -08:00
ridiculousfish
b0cf94e3ba Refactor function_prepare_environment
Migrate it into exec.cpp to reduce the complexity of
exec_block_or_func_process.
2019-11-10 14:46:21 -08:00
ridiculousfish
ac2eed2ffa Make io_chain_t store const io_data_t
This will make it easier to reason about with concurrent execution.
2019-11-10 14:00:30 -08:00
ridiculousfish
521d0e84f5 Remove non-const get_io_for_fd
These could be made unused.
2019-11-10 13:41:12 -08:00
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