Commit graph

10926 commits

Author SHA1 Message Date
Z. Grace Moreau
8c9f3c7bd4 update CHANGELOG 2019-10-23 19:41:53 +02:00
Z. Grace Moreau
b1fb99b578 add completions for cygpath and cygstart 2019-10-23 19:41:53 +02:00
LawAbidingCactus
305a657694 fix typos 2019-10-23 19:38:44 +02:00
Aaron Gyes
59e4314752 Apply --reverse for fish_color_*'s being used for a background
e.g. Allows using `--reverse` in fish_pager_color_search_match
and actually having the selected pager items display reversed.
2019-10-22 16:28:56 -07:00
Aaron Gyes
5fa9fb52aa config_make.h.in: remove __sentinel
We haven't used this attribute for a while
2019-10-22 16:27:58 -07:00
Fabian Homborg
66938d206a string: Error out on match -eq
The `--entire` would enable output even though the `--quiet` should
have silenced it. These two don't make any sense together so print an
error, because the user could have just left off the `-q`.
2019-10-22 22:11:36 +02:00
David Adam
d579964c7d travis: enable thread sanitizer build 2019-10-20 18:15:00 +08:00
Johannes Altmanninger
b52d3d641e Fix clean build of sphinx-docs 2019-10-20 08:15:58 +02:00
Collin Styles
ffb551fc06 Add --cut-at-cursor option to commandline -op calls in git completions
We used to just check for the presence of "--" on the command line to
make judgements about which completions to suggest. Now, even if "--" is
present, we can still make different suggestions by taking the cursor's
position into account.
2019-10-19 19:28:20 +02:00
Collin Styles
12a5dd219f Add completions for git-commit 2019-10-19 19:28:17 +02:00
Collin Styles
cc84dc7510 Add completions for git rev-parse 2019-10-19 19:26:12 +02:00
Collin Styles
486bc71cf8 Add completions for git reflog 2019-10-19 19:26:12 +02:00
Collin Styles
9384801e3c Add completions for push subcommand to git stash 2019-10-19 19:26:12 +02:00
Collin Styles
63e840995e git-reset: Don't suggest branch completions if -- is present
If "--" is present in the command line, it's usually safe to assume that
the user is going to want to complete a file tracked by git so let's
only suggest branches if "--" isn't present.
2019-10-19 19:26:12 +02:00
Collin Styles
3de3a34e79 Add completion for git log --date=human 2019-10-19 19:26:12 +02:00
Collin Styles
bd71308788 Add git completions for range-diff 2019-10-19 19:26:12 +02:00
Johannes Altmanninger
00fc1306d0 completions/git: allow arbitrary refs in git push remote src:dest
When there is already a "src:", we assume that it is a valid ref and
just complete "dst". This allows completion of dest if src is e.g. a
commit SHA (completing all possible refs would probably impact
performance).

See issue #3035.
2019-10-19 16:10:25 +02:00
Johannes Altmanninger
aa1bf9f277 sphinx: honor changes in static html assets
Also fix custom.css.
2019-10-19 14:52:24 +02:00
Fabian Homborg
e0d623d4b7 tests/test_util: Fix wrong argument in delta
This spewed errors because the `math` invocation got no second
operand:

    Testing file checks/sigint.fish ... math: Error: Too few arguments
    '1571487730 -'

but only if the `date` didn't do milliseconds, which is the case on
FreeBSD and NetBSD.

(also force the variable to be global - we don't want to have a
universal causing trouble here)
2019-10-19 14:27:47 +02:00
Fabian Homborg
fc0c39b6fd expand: Remove unused includes
sys/sysctl.h is deprecated on glibc, so it leads to warnings.
According to fa4ec55c96, it was included for KERN_PROCARGS2 for
process expansion, but process expansion is gone, so it's unused now.

(there is another use of it in common.cpp, but that's only on FreeBSD)

Also 1f06e5f0b9 only included
tokenizer.h (present since the initial commit) if KERN_PROCARGS2
wasn't available, so it can't have been important.

This builds and passes the tests on:

- Archlinux, with glibc 2.30
- Alpine, with musl
- FreeBSD
- NetBSD
2019-10-19 14:20:53 +02:00
艾雨寒 ArielAxionL
9ea8aa072f add a completion for zstd support
An update has been released by Arch Linux official to support the packages for zstd compression.

> https://www.archlinux.org/news/required-update-to-recent-libarchive/
2019-10-19 12:55:30 +02:00
Johannes Altmanninger
b7f35f949e Do not import vars that are equivalent to a universal exported var
Universal exported variables (created by `set -xU`) used to show up
both as universal and global variable in child instances of fish.

As a result, when changing an exported universal variable, the
new value would only be visible after a new login (or deleting the
variable from global scope in each fish instance).

Additionally, something like `set -xU EDITOR vim -g` would be imported
into the global scope as a single word resulting in failures to
execute $EDITOR in fish.

We cannot simply give precedence to universal variables, because
another process might have exported the same variable.  Instead, we
only skip importing a variable when it is equivalent to an exported
universal variable with the same name.  We compare their values after
joining with spaces, hence skipping those imports does not change the
environment fish passes to its children. Only the representation in
fish is changed from `"vim -g"` to `vim -g`.

Closes #5258.
This eliminates the issue #5348 for universal variables.
2019-10-19 12:41:57 +02:00
Johannes Altmanninger
5e274066e3 Always return absolute path in path_get_cdpath
Fixes #6220
2019-10-19 12:38:17 +02:00
Johannes Altmanninger
868eba5e80 Fix error on typing Alt-l on a token that starts with a dash 2019-10-19 12:31:09 +02:00
ridiculousfish
c8332bae8c sucess -> success, failiure -> failure 2019-10-18 18:36:03 -07:00
ridiculousfish
9652b3e11b Clean up job_or_process_extent
This had a bad merge which happened to work, plus some other nonsense.
2019-10-18 15:24:28 -07:00
Johannes Altmanninger
2fed311d4c builtin commandline: fix flags -p and -j not splitting on && and ||
Fixes #6214
2019-10-18 09:36:52 +02:00
Johannes Altmanninger
ed8b0c8c0c Add completions for the kakoune editor
[ci skip]
2019-10-17 21:50:27 +02:00
Delapouite
a2672dea7a doc: fix links pointing to history-search section
[ci skip]
2019-10-17 21:45:36 +02:00
Fabian Homborg
9c4edb68ff Add g++ completions that wrap gcc
Should be alright for a first pass.

Fixes #6217.

[ci skip]
2019-10-17 17:45:47 +02:00
Mahmoud Al-Qudsi
b29fd88cad [rustup] Add completions for rustup show and rustup profile
[ci skip]
2019-10-16 19:05:53 -05:00
Mahmoud Al-Qudsi
9a99836c74 [rustup] Fix string replace coalesce of multiple $argv
[ci skip]
2019-10-16 18:57:03 -05:00
ridiculousfish
3c727173c2 Include ctime in history_file.h
Fixes a build failure on FreeBSD.

Fixes #6210
2019-10-16 11:55:40 -07:00
Johannes Altmanninger
a6f5d9c0eb
Merge pull request #6103 from krobelus/expand-arg-to-short-option
Completion: complete argument to last of a group of short options
2019-10-16 11:37:04 +02:00
Johannes Altmanninger
eae1683033 Completion: complete argument to last of a group of short options
Consider a group of short options, like -xzPARAM, where x and z are options and z takes an argument.

This commit enables completion of the argument to the last option (z), both within the same
token (-xzP) or in the next one (-xz P).

complete -C'-xz' will complete only parameters to z.
complete -C'-xz ' will complete only parameters to z if z requires a parameter
otherwise, it will also complete non-option parameters

To do so this implements a heuristic to differentiate such strings from single long options. To
detect whether our token contains some short options, we only require the first character after the
dash (here x) to be an option. Previously, all characters had to be short options. The last option
in our example is z. Everything after the last option is assumed to be a parameter to the last
option.

Assume there is also a single long option -x-foo, then complete -C'-x' will suggest both -x-foo and
-xy. However, when the single option x requires an argument, this will not suggest -x-foo.
However, I assume this will almost never happen in practise since completions very rarely mix
short and single long options.

Fixes #332
2019-10-16 11:30:50 +02:00
Johannes Altmanninger
41bcf77e25 fix comment 2019-10-16 11:25:11 +02:00
Johannes Altmanninger
203a2e7af4 completions/grep: specify some required parameters 2019-10-16 11:23:53 +02:00
Johannes Altmanninger
466b6e1b43
Merge pull request #6207 from krobelus/sphinx-toc
sphinx: highlight current page in the site navigation
2019-10-16 11:19:27 +02:00
Johannes Altmanninger
c64aec9019
Merge pull request #6211 from Delapouite/doc-dirs
doc: add links between dirs, pushd and popd
2019-10-16 11:19:10 +02:00
Delapouite
e3caaed73f doc: add links between dirs, pushd and popd
[ci skip]
2019-10-16 09:05:59 +02:00
ARifleman
876176fc94 Added 'Nord' color scheme to sample color schemes (#6201) 2019-10-15 23:18:18 -07:00
ridiculousfish
ca11b5edc8 Add a simple test for SIGINT out of loops 2019-10-15 22:33:53 -07:00
ridiculousfish
cc1c973025 Remove job_flags as an enum, just use a struct
This removes an over-complicated flag implementation, replacing it with
just a plain struct.
2019-10-15 14:40:58 -07:00
Johannes Altmanninger
cff721afda sphinx: highlight current page in the site navigation
Fixes #6189
2019-10-15 22:25:23 +02:00
Z. Grace Moreau
4c63ae357a update CHANGELOG 2019-10-15 13:05:08 -07:00
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