Commit Graph

267 Commits

Author SHA1 Message Date
ridiculousfish
1d21e3f470 Make while loops evaluate to the last executed command status
A while loop now evaluates to the last executed command in the body, or
zero if the loop body is empty. This matches POSIX semantics.

Add a bunch of tricky tests.

See #4982
2019-01-20 16:41:59 -08:00
ridiculousfish
f4351eb0f3 Relnote fix for #5449 in 3.0.1 2019-01-20 13:55:18 -08:00
David Adam
0c25d7a49c CHANGELOG: 3.0.0 updates 2018-12-28 20:56:17 +08:00
David Adam
355cb88e38 Bump version for 3.0b1 2018-12-11 22:04:20 +08:00
David Adam
566aa6e78f CHANGELOG: final edits to 3.0b1
Up to 99d56ea2f9
2018-12-11 21:37:12 +08:00
David Adam
f022b4b721 CHANGELOG: further updates toward 3.0b1
Up to eb0539af60.
2018-12-09 21:37:19 +08:00
David Adam
d40a07436a CHANGELOG: further updates toward 3.0b1 2018-12-06 22:41:22 +08:00
Fabian Homborg
edf95478d9 CHANGELOG: Remove $cmd_duration change
We reverted this again.

[ci skip]
2018-11-30 19:08:29 +01:00
David Adam
19be5f31b8 CHANGELOG: improve some verbiage
[ci skip]
2018-11-24 22:08:10 +08:00
Mahmoud Al-Qudsi
31d17f4559 Rename string escape --style=pcre2 to string escape --style=regex 2018-11-16 20:22:06 -06:00
Mahmoud Al-Qudsi
680040d17d Document new PCRE2 string escaping in CHANGELOG and string.txt 2018-11-15 12:00:56 -06:00
Mahmoud Al-Qudsi
f56c317bd0 Add note about literal 0 indices to changelog
[ci skip]
2018-11-14 23:35:03 -06:00
David Adam
eed274ff78 CHANGELOG: editing for upcoming 3.0
[ci skip]
2018-11-13 22:54:59 +08:00
Mahmoud Al-Qudsi
34440165aa Add completions for openocd 2018-11-07 20:08:16 -06:00
Aaron Gyes
db1500bfa4
Update CHANGELOG.md
Mention that dim/italics were made to work on macOS (ancient ncurses).
2018-11-06 14:09:26 -08:00
David Sanson
7926b69d15 Add completions for pandoc
Taken from https://github.com/dsanson/fish-completion-pandoc under the
GNU GPL as at 7195da6fc4bcbdd49ea63d47c27e4bfec2135660.

Closes #2937.
2018-11-04 21:22:58 +08:00
ridiculousfish
47890389e1 Merge branch 'uvar_path_support'
Support for --path and --unpath in universal variables.
Closes  #5271
2018-10-27 01:24:27 -07:00
ridiculousfish
9690ac5974 Rename fish_universal_variables file to fish_variables
This is to avoid development versions of fish 3.0 freaking out when the
file format is changed. We now have better support for for future universal
variable formats so it's unlikely we'll have to change the file name again.
2018-10-26 16:06:50 -07:00
Mahmoud Al-Qudsi
5ad292328a Add dynamic clang completions via clang --autocomplete
Use clang/clang++'s own autocompletion support to complete arguments. It
is rather convoluted as clang generates autocompletions for a portion of
the current token rather than the entire token, e.g. while `--st` will
autocomplete to `--std=` (which is fine by fish), `--std=g` will
autocomplete to `gnu...` without the leading `--std=` which breaks fish'
support for the completion.

Additionally, on systems where clang/clang++ is the system compiler
(such as FreeBSD), it is very often for users to invoke a newer version
of clang/clang++ installed as clang[++]-NN instead of clang. Using a
monkey-patched version of `complete -p` to support that without breaking
(future) completions for commands like `clang-format`.

Closes #4174.
2018-10-24 23:14:55 -05:00
Mahmoud Al-Qudsi
f695284a84 Add fish private mode info to changelog and manual 2018-10-24 19:33:48 +02:00
Fabian Homborg
1d5e715008 source: Return error instead of implicitly reading from tty
For things like

    source $undefined

or
    source (nooutput)

it was quite annoying that it read from tty.

Instead we now require a "-" as the filename to read from the tty.

This does not apply to reading from stdin if it's redirected, so

    something | source

still works.

Fixes #2633.
2018-10-22 21:22:27 +02:00
ridiculousfish
3f3b3a7006 Export arrays as colon delimited, and support path-style variables
This commit begins to bake in a notion of path-style variables.

Prior to this fix, fish would export arrays as ASCII record separator
delimited, except for a whitelist (PATH, CDPATH, MANPATH). This is
surprising and awkward for other programs to deal with, and there's no way
to get similar behavior for other variables like GOPATH or LD_LIBRARY_PATH.

This commit does the following:

1. Exports all arrays as colon delimited strings, instead of RS.

2. Introduces a notion of "path variable." A path variable will be
"colon-delimited" which means it gets colon-separated in quoted expansion,
and automatically splits on colons. In this commit we only do the exporting
part.

Colons are not escaped in exporting; this is deliberate to support uses
like

    `set -x PYTHONPATH "/foo:/bar"`

which ought to work (and already do, we don't want  to make a compat break
here).
2018-10-19 17:29:39 -07:00
ridiculousfish
ff042bbb7b Relnote %self 2018-10-19 17:13:13 -07:00
ridiculousfish
0f0bb1e10f Don't resolve symlinks with cd
This switches fish to a "virtual" PWD, where it no longer uses getcwd to
discover its PWD but instead synthesizes it based on normalizing cd against
the $PWD variable.

Both pwd and $PWD contain the virtual path. pwd is taught about -P to
return the physical path, and -L the logical path (which is the default).

Fixes #3350
2018-10-06 17:03:18 -07:00
Fabian Homborg
64783428d4 [CHANGELOG] Add more for 3.0 2018-10-02 18:41:59 +02:00
David Adam
551ca813e0 CHANGELOG: linkify some completion PRs 2018-10-01 17:17:33 +08:00
Fabian Homborg
35ce95f51d [Changelog] bind preset change
No reason to even mention them, people will care more about f_u_k_b.
2018-09-30 16:58:06 +02:00
Fabian Homborg
d62731a931 [CHANGELOG] Reorganize
This should make it more attractive to those not in the know.
2018-09-30 16:57:11 +02:00
Mahmoud Al-Qudsi
f15dd314e0 Revert "Add hash function for compatibility with sh/bash"
This reverts commit dbd228cc75.
2018-09-27 17:21:12 -05:00
Mahmoud Al-Qudsi
f5083d7bab Set $status after while depending on whether loop was entered
Closes #4982.
2018-09-27 08:15:45 -05:00
Mahmoud Al-Qudsi
dbd228cc75 Add hash function for compatibility with sh/bash 2018-09-26 12:43:40 -05:00
Digital
794b448c00 Add completions for openbsd's doas (#5196)
* Add completions for openbsd's doas

* Update CHANGELOG.md

* Implement requested changes
2018-09-25 12:31:46 +02:00
ridiculousfish
865a4647ae Allow variables in commands
Syntax highlighting for these coming in next commit.

Fixes #154
2018-09-01 12:00:56 -07:00
Mahmoud Al-Qudsi
2cccc9b589 Add changelog note about background process reaping on exec 2018-08-22 12:26:38 -05:00
David Adam
ad4913fd61 README.md: add optional dependencies for yarn, bower and npm completions 2018-08-21 14:48:32 +08:00
David Adam
a78a480c53 CHANGELOG: whitespace fixes 2018-08-21 14:47:08 +08:00
Mahmoud Al-Qudsi
1b1bc28c0a Protect against loss of background jobs on exec
`exec` now exhibits the same behavior as `exit` and prompts the user to
confirm their intention to end the current process if there are
background jobs running. Running `exec` again immediately thereafter
will force the exec to go through.

Additionally, background jobs are reaped upon exec to prevent process
leaking (same as `exit`).
2018-08-20 22:52:47 -05:00
Anton Shestakov
d70cdb19c1 CHANGELOG: mention hg completion 2018-08-15 14:44:08 +08:00
ridiculousfish
9c957eeef3 Prefer to not autosuggest existing arguments
This teaches autosuggestions to demote completions whose text matches an already
present argument.
2018-08-07 02:04:43 -07:00
ridiculousfish
d2bee105c9 Default math scale to 6
This changes the behavior of builtin math to floating point by default.
If the result of a computation is an integer, then it will be printed as an
integer; otherwise it will be printed as a floating point decimal with up to
'scale' digits past the decimal point (default is 6, matching printf).
Trailing zeros are trimmed. Values are rounded following printf semantics.

Fixes #4478
2018-08-04 15:32:09 -07:00
ridiculousfish
40e37c4a87 Teach test to handle floating point values 2018-08-03 00:48:50 -07:00
Mahmoud Al-Qudsi
09541e9524 Add completions for hjson 2018-07-30 14:38:00 -05:00
David Adam
3561f36cc4 CHANGELOG: initial updates for 3.0
[ci skip]
2018-07-27 16:50:32 +08:00
ridiculousfish
9d1fc1045e Implement 'functions -d' to set function description
This was documented, but didn't actually work.

Fixes #5105
2018-07-22 11:28:05 -07:00
James Lee
e26bdff487 Improve eopkg completions by using the --installed flag (#5089)
Utilized the `--install` flag added in commit #8c09d6e.

Limit `eopkg remove/autoremove/check ...` completions to installed packages.
Limit `eopkg install/upgrade/info ...` completions to available packages.
2018-07-09 23:21:44 -07:00
Mahmoud Al-Qudsi
8c09d6e063 Limit apt remove ... completions to installed packages only
Added a new flag `--installed` via `argparse` to `__fish_print_packages`
which indicates that only installed packages should be listed.

TODO: Other non-debian/apt platforms should take advantage of this flag/
behavior as well.
2018-07-02 11:43:18 -05:00
ridiculousfish
62d73bee5e Add string split0 and join0 to changelog 2018-07-01 16:35:23 -07:00
Mahmoud Al-Qudsi
121c70cf39 Add completions for FreeBSD's kldunload
Lists currently loaded kernel modules as valid completions, and obtains
a description via the newly minted `__fish_whatis` if available.
2018-06-27 14:14:40 -05:00
Fabian Homborg
cbdd347ec6 Changelog range expansion change, expand docs 2018-06-25 17:57:06 +02:00
Mahmoud Al-Qudsi
5061f1666b Add completions for FreeBSD's kldload 2018-06-18 21:01:05 -05:00