Commit Graph

369 Commits

Author SHA1 Message Date
Johannes Altmanninger
9b86d5dd16 Export all local exported variables in a new scope
Fixes #6153
2019-10-06 12:10:21 -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
David Adam
75bd821495 CHANGELOG: minor work on 3.1.0 2019-10-04 07:11:04 +08:00
David Adam
3ca4dbb2b9 CHANGELOG: work on 3.1.0
[ci skip]
2019-09-26 22:59:02 +08:00
David Adam
10f38c6865 CHANGELOG: work on 3.1.0
[ci skip]
2019-09-23 23:29:43 +08:00
ridiculousfish
6bbf3726fc Relnote expand-abbr and self-insert changes 2019-09-21 16:06:19 -07:00
ridiculousfish
d903fe6073 Relnote fix for #3189 2019-09-14 16:42:28 -07:00
David Adam
77ef2ef6c3 jobs: return success when a job is found via --last
Closes #6104.
2019-09-14 13:01:36 -05:00
LawAbidingCactus
35b64b0470 add completions for qubes-gpg-client 2019-08-27 15:20:07 +08:00
ridiculousfish
124def8f4b Un-changelog the history fix
Turns out the bug never actually shipped in a release; it bisected to
3ae5b23971
2019-08-15 19:59:35 -07:00
ridiculousfish
a87e0183df Stop rewriting the history file on every command
fish is designed to append to the history file in most cases. However
save_internal_via_appending was never returning success, so we were
always doing the slow rewrite path. Correctly return success.

Fixes #6042
2019-08-15 13:49:17 -07:00
Aaron Gyes
47798510bd tests, CHANGELOG: regex-easyesc
Oops, missed these the first time around.
2019-08-13 22:56:31 -07:00
LawAbidingCactus
1693b53221 document changes in CHANGELOG.md 2019-08-08 18:49:26 +02:00
Klaus Alexander Seistrup
28a17c4b05 Document that the : command now always exits successfully 2019-08-03 18:14:12 +02:00
Fabian Homborg
6500765256 Allow switch with something that expands to nothing
Meaning empty variables, command substitutions that don't print
anything.

A switch without an argument

```fish
switch
   case ...
end
```

is still a syntax error, and more than one argument is still a runtime
error.

The none-argument matches either an empty-string `case ''` or a
catch-all `case '*'`.

Fixes #5677.

Fixes #4943.
2019-07-31 14:08:28 +02:00
ridiculousfish
822b53c67a Don't color a whole string invalid because of an unclosed quote
When syntax highlighting a quoted string, if the string is not closed,
only show the opening quote as an error, not the whole string.
2019-07-24 12:43:47 -07:00
ridiculousfish
554ee240b3 Correct handling of explicitly separated output when all elements are empty
Previously when propagating explicitly separated output, we would early-out
if the buffer was empty, where empty meant contains no characters. However
it may contain one or more empty strings, in which case we should propagate
those strings.

Remove this footgun "empty" function and handle this properly.

Fixes #5987
2019-07-21 14:00:27 -07:00
ridiculousfish
e8c6de8055 Correctly export empty universal variables
Fixes #5992
2019-07-21 12:45:29 -07:00
ridiculousfish
d577eb4aaa Only use the global fish_complete_path and fish_function_path
Prior to this fix, fish would attempt to react if a local fish_complete_path
or fish_function_path were set. However this has never been very well tested
and will become impossible with concurrent execution. Always use the global
values.
2019-07-12 12:40:12 -07:00
Fabian Homborg
5133287873 CHANGELOG: List path_helper changes
Just replace the issue number because this is effectively a
replacement of the previous.

[ci skip]
2019-07-02 22:18:40 +02:00
Fabian Homborg
427a18c1ea fish_git_prompt: Add a way to use the informative chars
$__fish_git_prompt_use_informative_chars will use the informative
chars without requiring informative mode (which is really frickin'
slow!).

See #5726.

[ci skip]
2019-06-25 16:11:18 +02:00
Fabian Homborg
e921bd60c3 docs: Build index, tutorial and faq as man pages
This was clearly intended for index, but because it was called "fish"
it was overwritten by the "fish" command man page.

I also added the tutorial and faq. Both of those might not be *ideal*
as man pages (the tutorial makes references to colors that won't show
up), but it's better to provide them than not.

Hat-tip to @wwared

See #5521.

[ci skip]
2019-06-23 16:16:44 +02:00
Fabian Homborg
9b54a53758
Prevent not-yet-loaded functions from loaded when erased (#5951)
* Prevent not-yet-loaded functions from loaded when erased

Today, `functions --erase $function` does nothing if the function
hasn't been autoloaded yet.

E.g. run, in an interactive session

    > functions --erase ls
    > type ls

and be amazed that it still shows our default `ls --color=auto`
wrapper function.

This seems counter-intuitive - removing a function ought to remove it,
whether it had been executed before or not.

* doc/changelog
2019-06-22 11:08:36 +02:00
Lily Ballard
181e44d331 Invert the flag for string collect
Instead of requiring a flag to enable newline trimming, invert it so the
flag (now `--no-trim-newlines`) disables newline trimming. This way our
default behavior matches that of sh's `"$(cmd)"`.

Also change newline trimming to trim all newlines instead of just one,
again to match sh's behavior.
2019-06-16 16:40:14 -07:00
Lily Ballard
b41e5cbbb7 Add string collect
The `string collect` subcommand behaves quite similarly in practice to
`string split0 -m 0` in that it doesn't split its output, but it also
takes an optional `--trim-newline` flag to trim a single trailing
newline off of the output.

See issue #159.
2019-06-16 15:51:57 -07:00
Fabian Homborg
5e78d6dcc9 CHANGELOG math "x"
[ci skip]
2019-06-10 18:46:06 +02:00
Fabian Homborg
d1d5716ae1 CHANGELOG read history
[ci skip]
2019-06-06 19:14:11 +02:00
Fabian Homborg
77be5b05c6 CHANGELOG complete -F
[ci skip]
2019-05-30 19:20:15 +02:00
Fabian Homborg
97507a24a2 Increase default read limit to 100MiB
Someone has hit the 10MiB limit (and of course it's the number of
javascript packages), and we don't handle it fantastically currently.

And even though you can't pass a variable of that size in one go, it's
plausible that someone might do it in multiple passes.

See #5267.
2019-05-29 11:01:45 +02:00
Fabian Homborg
7086ba43c8 CHANGELOG: Arbitrarily reorder notable fixes
This is roughly in order of importance.

Buffering is really quite nice, $pipestatus is a new thing, $PATH was
a big hubhub, people seem to like eval...

[ci skip]
2019-05-28 22:28:45 +02:00
Fabian Homborg
1e9ec8739b CHANGELOG: Clarify message about parser errors, fix commit
3e055f does not exist. I'm assuming it's
b2a1da602f.

Unfortunately, I'm not entirely sure what kind of parser errors
weren't propagated, so this note isn't all that useful.

[ci skip]
2019-05-28 22:24:47 +02:00
ridiculousfish
63a16befd4 Introduce the fish log, a replacement for debug()
This adds a new mechanism for logging, intended to replace debug().

The entry points are FLOG and FLOGF. FLOG can be used to log a sequence of
arguments, FLOGF is for printf-style formatted strings.

Each call to FLOG and FLOGF requires a category. If logging for a category
is not enabled, there is no effect (and arguments are not evaluated).

Categories may be enabled on the command line via the -d option.
2019-05-27 17:24:52 -07:00
Fabian Homborg
967c1d51ee Only do brace expansion if they contain a variable or ","
Brace expansion with single words in it is quite useless - `HEAD@{0}`
expanding to `HEAD@0` breaks git.

So we complicate the rule slightly - if there is no variable expansion
or "," inside of braces, they are just treated as literal braces.

Note that this is technically backwards-incompatible, because

    echo foo{0}

will now print `foo{0}` instead of `foo0`. However that's a
technicality because the braces were literally useless in that case.

Our tests needed to be adjusted, but that's because they are meant to
exercise this in weird ways.

I don't believe this will break any code in practice.

Fixes #5869.
2019-05-19 18:23:27 +02:00
Dawid Dziurla
0b3bb0e7c1 Underline every valid entered path (#5872)
* src/highlight: Underline every valid entered path

* update CHANGELOG

* fix highlight test
2019-05-19 10:03:56 +02:00
Fabian Homborg
8f3f4bbc9c CHANGELOG fish_indent semicolons and test stacktrace
[ci skip]
2019-05-05 15:22:01 +02:00
Fabian Homborg
8c9359fdd4 src/builtin_argparse: Add --ignore-unknown flag
This keeps all unknown options in $argv, so

```fish
argparse -i a/alpha -- -a banana -o val -w
```

results in $_flag_a set to banana, and $argv set to `-o val -w`.

This allows users to use multiple argparse passes, or to simply avoid
specifying all options e.g. in completions - `systemctl` has 46 of
them, most not having any effect on the completions.

Fixes #5367.
2019-04-29 15:57:56 +02:00
Fabian Homborg
af0e08e9f1 argparse: Use the current function name by default
This makes the `--name` option usually unnecessary.

See #5835.
2019-04-27 15:55:49 +02:00
Fabian Homborg
94ece96bce CHANGELOG path-component
I should really add this immediately.

[ci skip]
2019-04-26 19:17:27 +02:00
Fabian Homborg
ebf1914a35 CHANGELOG complete -C change
[ci skip]
2019-04-26 16:11:43 +02:00
Mahmoud Al-Qudsi
a9e0990773 Add changelog note about parser error propagation fix
..as this affects backwards compatibility (as witnessed by the tests
that failed after making this fix).
2019-04-13 17:28:16 -05:00
David Adam
56125f73e4 env: trigger locale updates if LOCPATH changes
Closes #5815.
2019-04-13 21:58:54 +08:00
Mahmoud Al-Qudsi
b82fa187ea Changelog: mention changes to eval scoping 2019-04-11 11:55:12 -05:00
Fabian Homborg
ab92baf671 CHANGELOG repaint-mode
[ci skip]
2019-04-01 16:14:00 +02:00
Fabian Homborg
bc958712e4 CHANGELOG INTERNAL_WCWIDTH
[ci skip]
2019-04-01 16:02:09 +02:00
Fabian Homborg
90958f2402 CHANGELOG $PATH reordering
[ci skip]
2019-03-30 21:25:27 +01:00
Fabian Homborg
21d8b465cc nextd/prevd: Print BEL instead of "Hit end of history"
That message is just hugely annoying.

Hat-tip to @floam and d524bad5f16b5a18c22fefe440.
2019-03-28 11:58:53 +01:00
Fabian Homborg
54156845e4 CHANGELOG error changes
[ci skip]
2019-03-26 19:33:26 +01:00
Fabian Homborg
b86200938f Always use "." for cd
Nobody doesn't want to use $PWD to cd, so if $CDPATH does not include
it that was a mistake.

Bash also appends "." here.

Fixes #4484.
2019-03-26 10:11:36 +01:00
ridiculousfish
93d70fae11 Relnote stop buffering deferred function processes 2019-03-24 21:39:39 -07:00