Commit Graph

13535 Commits

Author SHA1 Message Date
Fabian Homborg
3eff7b26bf __fish_print_pipestatus: Add missing quotes
If this was called without an argument you'd not have a valid `test`
invocation.

Gosh I hate test.
2021-01-22 21:55:35 +01:00
Fabian Homborg
a407af2944 completions/git: Silence git's errors
This can spew about not finding the ignore file in some circumstances.
2021-01-22 21:54:36 +01:00
Fabian Homborg
20741007c8 tests: Increase one more timeout
Alright, maybe it's the mode switch in this case.
2021-01-22 21:49:40 +01:00
Fabian Homborg
2109817861 MOAR CHANGELOG 2021-01-22 16:51:46 +01:00
Fabian Homborg
5f93df240e Fish for bash users: Fix missing word and link it from index 2021-01-22 16:23:09 +01:00
Fabian Homborg
435021e8c2 CHANGELOG 4: Possibly too much changelog edition
Some reformatting and showing an example for the prompt truncation, mainly
2021-01-21 19:07:38 +01:00
Alexander Sieg
ddab61616f
Include completion for all pkg alias subcommands (#7642)
* Include completion for all pkg alias subcommands

* Formatting and dynamic evaluation of alias subcommands

* only set package_name completion once

* fixed syntax error
2021-01-21 18:43:26 +01:00
Fabian Homborg
392fb490b0 CHANGELOG 3: Return Of The Changelog 2021-01-20 21:30:50 +01:00
Fabian Homborg
7265d3763f CHANGELOG: Even moar 2021-01-20 19:53:53 +01:00
Fabian Homborg
5d8761dc31 CHANGELOG: Work on 3.2.0 2021-01-20 17:57:09 +01:00
Fabian Homborg
e0455d13e7 tests/git: Start an interactive fish
This makes the fish_git_prompt variable handlers kick in, meaning we
see the informative chars.

The big question here is what happens if there's a non-UTF-8 locale in
the test.

Theoretically we set LC_CTYPE, but.....
2021-01-19 19:16:17 +01:00
Fabian Homborg
c5379aaf2d CHANGELOG Add 7638 2021-01-19 19:02:58 +01:00
Akatsuki Rui
1a9835f55e
completions/mtr: init (#7638)
* completions/mtr: init

Add mtr completion.

[ci skip]

* completions/mtr: edit descriptions
2021-01-19 18:09:09 +01:00
Fabian Homborg
89962da059 CHANGELOG: More 3.2.0 2021-01-19 13:45:00 +01:00
ridiculousfish
ef3b6750ba Add some additional packges to our Docker image based tests
This allows using sudo and openssl
2021-01-18 15:51:03 -08:00
ridiculousfish
7f15ec51fd Add a password for fishuser accounts in some Docker images
The password is fish
2021-01-18 15:37:13 -08:00
Mahmoud Al-Qudsi
e2273bacb2 Separate completions for GNU and BSD ps command
It's not just -F; the majority of options are actually not portable
between the two.

Closes #7545
2021-01-18 14:23:39 -06:00
Fabian Homborg
88a84bd988 reader: Force ONLCR on for fish and external commands
Just like OPOST this just breaks output for anything not prepared for
it. Fish itself might work with it (and #4505 recommends it), but external commands are broken.

You'll see output like

foo
   ⏎

from `echo foo`.

Fixes #4873.

Continuation of #7133.
2021-01-18 21:00:08 +01:00
Fabian Homborg
bc6414aaa8
!fixup fish_git_prompt: Fix variable name
This missed one use of $user_variable
2021-01-18 12:37:30 +01:00
Fabian Homborg
8b133833fa Don't inherit windows paths for $PWD
If given a windows path like `F:\foo`, this currently ends up
assert()ing in path_normalize_for_cd.

Instead, since these paths violate a bunch of assumptions we make, we
reject them and fall back on getting $PWD via getcwd() (which should
give us a nice proper unixy path).

Fixes #7636.

This isn't tested because it would require a system where a windowsy
path passes paths_are_same_file, and on the unix systems we run our
tests that's impossible as far as I can tell?
2021-01-17 23:08:04 +01:00
Fabian Homborg
dbfd3b5c39 fish_git_prompt: Remove a few unneeded variables 2021-01-17 21:04:16 +01:00
Fabian Homborg
1285957703 docs: Add glob example to variable overrides
And clarify that it'll still run the same things
2021-01-17 10:31:23 +01:00
Fabian Homborg
e2fb645c0c docs: Don't add rst sources
This used to add a "_sources" directory with all the ".rst" files
renamed to ".rst.txt".

That took up ~0.7M of the total size for very little use.
2021-01-16 19:33:12 +01:00
Fabian Homborg
fa9c233065 Add a simple git test
Just checks two completions and the prompt for now, but shows what is possible.

Work on #4249.
2021-01-16 13:30:04 +01:00
Fabian Homborg
5ca27ac565 Update littlecheck
From commit b1369a52c24336da2d2d6d5dc6707a7834065d43

This adds the "REQUIRES" directive that allows specifying
preconditions for tests, which allows us to add tests that don't have
to run on all systems.

Now, I don't want to just make all tests specific to an OS or
something, but e.g. a `git` test would be a honkin' great idea, and we
can't ask everyone to have `git`!
2021-01-16 13:26:01 +01:00
Fabian Homborg
932074f06c escape_string_script: Escape DEL as \x7f
This used to print a literal DEL character in the output for `bind`,
which wouldn't actually show up and made it hard to figure out what
the key was.

So we just escape it back to how we actually used it - `\x7f`.

Fixes #7631.
2021-01-16 12:49:49 +01:00
Fabian Homborg
a4f5dd5054 set: Move the new values
A C++ special!

This makes

```fish
set -l var (seq 1 10000)
set -l v
for f in $var
    set -a v $f
end
```

~15% faster by removing allocations.
2021-01-15 21:00:25 +01:00
Johannes Altmanninger
f176503c0f Remove the explicit undo group in fish_clipboard_paste
It doesn't change the behavior, see
7669e8e497 (r45675920)
2021-01-15 20:23:59 +01:00
Johannes Altmanninger
692a8aef03 completions/xargs: provide subcommand completions 2021-01-15 20:23:59 +01:00
Fabian Homborg
e192066e98 Add $fish_handle_reflow to disable winch handler
Overriding event handlers is annoying.
2021-01-15 18:37:06 +01:00
Fabian Homborg
48082daad4 Turn off reflowing for Konsole >= 21.04 as well
See https://bugs.kde.org/show_bug.cgi?id=196998, https://invent.kde.org/utilities/konsole/-/merge_requests/321

Part of #7491.
2021-01-15 18:37:06 +01:00
David Adam
d0167634e7 CHANGELOG: work on 3.2.0 2021-01-13 21:52:31 +08:00
Ben Woods
1890c848e0
completions: Add support for lightdm and dm-tool commands (#7624) 2021-01-13 14:37:42 +01:00
Henrik Hermansen
1d1e8a54a0 Properly fix git diff check 2021-01-13 14:36:41 +01:00
Henrik Hermansen
eaf7431c38 Fix Git status in Acidhub prompt
Fix 1: The --quiet flag must be at the end of the command. The way it was I would never get any status symbol in my prompt as the command failed.
Fix 2: After adding files to git, but before committing them, git status is unsorted. This gave me the output "M A M A" after `uniq`, which resulted in 4 status symbols instead of 2. Sorting them before filtering them fixed the problem.
2021-01-13 14:36:41 +01:00
Matthew Dutson
d079026ecc Merge branch 'master' into intro-doc 2021-01-12 17:37:16 -06:00
Matthew Dutson
480f7fdb37 Revise "Piping" section 2021-01-12 17:24:23 -06:00
Clément Martinez
c76074b1d6 Add losetup completions 2021-01-12 08:22:28 +01:00
ridiculousfish
7a0bddfcfa Teach string repeat to handle multiple arguments
Each argument in string repeat is handled independently, except that the
--no-newline option applies only to the last newline.

Fixes #5988
2021-01-11 17:00:06 -08:00
ridiculousfish
290d1f2cd6 Mild refactoring of builtin_string repeat
Preparation for fixing issue 5988; no behavior change expected here.
2021-01-11 16:52:39 -08:00
ridiculousfish
1d4883d810 Remove an unnecessary 'using' declaration
This was just redundant with the struct tag.
2021-01-11 15:23:52 -08:00
ridiculousfish
7207a205f2 Switch history races test to use threads instead of processes
This avoids issues with ASan and TSan whose allocators do not properly
clean up in atfork, leading to deadlocks in child processes.
2021-01-11 12:44:21 -08:00
ridiculousfish
2709467b73 Add a Ubuntu bionic asan clang dockerfile test
This may be run with:

    ./docker/docker_run_tests.sh ./docker/bionic-asan-clang.Dockerfile
2021-01-11 12:44:21 -08:00
Fabian Homborg
32c65aa32c Lock threads only once a day
This ran hourly, and that's really not necessary anymore.
2021-01-11 21:03:10 +01:00
Fabian Homborg
3fc9c0b38c tests: Increase cancellation delay
This sometimes fails on github actions with ASAN. I am assuming that's
because the ctrl-c happens *before* the process has had a chance to
start.

So we do what we do and increase the delay.
2021-01-11 21:00:33 +01:00
Fabian Homborg
7bf2b9fd43 output: Rename some variables
These are a foreground and a background color. Now I see the point in
not naming them "foreground_color" and "background_color", but at
least "fg" and "bg" should do, right?
2021-01-11 20:56:15 +01:00
Fabian Homborg
f7b2bf8229 output: Simplify some duplicated code
Becomes a bit boring after a while
2021-01-11 20:53:11 +01:00
Fabian Homborg
19efd22468 env: Setup $HOME/$USER *before* the config directories
They are based on $HOME, so setting $HOME has to be done first.

Fixes #7620

(untested because I'm assuming common CI systems have weird $HOME settings)
2021-01-11 18:51:47 +01:00
exploide
20d91c6be2 added completion script for alternatives 2021-01-10 18:35:46 +01:00
Fabian Homborg
bb3b6e3329 completions/timedatectl: Add missing quotes
Oops!

Supersedes #7617.
2021-01-10 18:33:31 +01:00