Commit Graph

13202 Commits

Author SHA1 Message Date
Érico Rolim
21041e3cc7 src: don't split wide char strings that are used with gettext.
A bug in xgettext leads to the generation of useless msgids in the po
files for these strings.
2020-11-13 14:34:42 +01:00
Érico Rolim
036ed36887 share/completions/ls: remove double whitespace.
Small typo in the description for one of the options.
2020-11-13 14:34:42 +01:00
Érico Rolim
943ead2598 share/completions: fix non-standard capitalization.
Use "Installed package" instead of "Installed Package".
2020-11-13 14:34:42 +01:00
Érico Rolim
3873d68593 po/pt_BR: update translations. 2020-11-13 14:33:04 +01:00
Érico Rolim
6e9d5c00e5 src/builtin_type.cpp: add missing gettext call.
The string "%ls is %ls", which is printed when `type <command>` is ran
for a command in PATH, couldn't be localized, since it was missing _()
around it.
2020-11-13 14:31:40 +01:00
Marcus Atilius Regulus
7b9c1a6076 escape a backslash (in 2 places) in argparse docs 2020-11-13 14:27:12 +01:00
Mahmoud Al-Qudsi
6bd4f52b0d [zfs] Optimize enumeration of snapshots
Only generate the list of snapshots when
a) the argument must be a snapshot and nothing else, or
b) the argument as typed contains a literal @, or
c) a snapshot is a valid completion and there is only one dataset
   matching the argument as entered.

Unfortunately, it seems the `zfs` command itself is extremely primitive
and doesn't support listing snapshots by dataset so when we need to
generate completions, we end up needing to enumerate all snapshots
(ever) across all datasets. I'd be very happy to be proven wrong, but I
think the only other way would be manually parse `zdb` output.

See #7472
2020-11-12 22:24:29 -06:00
ridiculousfish
17fc542082 Revert "Stop caching line breaks in the prompt calculation"
This reverts commit a2ff32d904.

Per comments on the commit, the original code had correct handling of line
breaks inside escapes.
2020-11-12 10:55:11 -08:00
David Adam
80618599f9 fish.spec: correct a syntax error
Fixup of ff144a3
2020-11-12 21:50:34 +08:00
David Adam
ff144a38d0 fish.spec: correctly test for macro existence
Fixup of a97566b
2020-11-12 18:09:44 +08:00
David Adam
a97566b6f1 fish.spec: switch to %cmake_build macro when available
Should fix the build on Fedora 33.
2020-11-12 14:59:02 +08:00
Fabian Homborg
d8cf8de99b Remove Travis
Travis is gone.

We have Github Actions set up now, which should be okay.

Fixes #7447.
2020-11-11 20:17:00 +01:00
Fabian Homborg
25823d2900 And another delay change
Monty Python this ain't.
2020-11-11 19:57:29 +01:00
Fabian Homborg
ae0c68ec7e Tests: Yet another delay change
Now this failed because the CI added 90ms of delay.

*sigh*
2020-11-11 19:20:55 +01:00
Fabian Homborg
6ceada8aa1 CI: Add sanitizer builds 2020-11-11 17:55:03 +01:00
Fabian Homborg
afa57619a8 CI: Add 32bit Ubuntu build with vendored pcre2
From Travis
2020-11-11 17:53:18 +01:00
Fabian Homborg
6e3537dbde CI: Add CXXFLAGS from Travis
This errored for some Warnings to match OBS
2020-11-11 17:43:24 +01:00
Shawn LeMaster
e4b64448fa Don't assume $__fish_git_prompt_char_cleanstate is non-empty
This fixes the case where an empty "clean state" character
can cause a spurious space character at the end of the git prompt.
2020-11-10 18:55:15 +01:00
Fabian Homborg
eed70d719a tests: More slack
The classic mistake: Some of these have a bit of a delay, but it's supposed to
be *under* the timeout, so it needs to be *shorter* not longer to
increase the slack.
2020-11-09 19:56:53 +01:00
Fabian Homborg
a52bf1d078 tests: Use math for the prompt counter 2020-11-09 19:42:46 +01:00
Fabian Homborg
9b0bec59ae tests: Use python-level kill in job_summary tests
Also increase the `sleep` time.

This *might* help with Github Actions, I'm not entirely sure why this
is failing?
2020-11-09 19:42:19 +01:00
Fabian Homborg
fd66b66a86 tests: Retry interactive tests once
We used to have this, it helps with resource constrained CI systems
2020-11-09 19:26:27 +01:00
Fabian Homborg
2318d037ac tests: Increase timeouts even more
Wow the github actions machines are *slow*
2020-11-09 19:10:24 +01:00
Shun Sakai
36337fc45d Add completions for julia 2020-11-09 00:41:38 +09:00
Fabian Homborg
e5061bcda1 docs: Use string split -n for pkg-config
It can in some cases give a trailing space, which causes us to return
an empty element.

Fixes #7465.
2020-11-08 13:40:00 +01:00
Fabian Homborg
b0f338cf14 Fix error message in tests
Switching from the old debug() to flog causes a shift from

<E> fish:

to

error:

and in this one place we still test it.
2020-11-07 22:48:13 +01:00
Fabian Homborg
5ee3eeff5d Remove the final two debug() calls 2020-11-07 10:20:52 +01:00
Fabian Homborg
bff1f1aeea Actually run the tests on Github Actions Ubuntu
Oops
2020-11-07 07:55:47 +01:00
Fabian Homborg
e73929b2c6 tests/bind: Increase another delay
I don't understand why, but somehow this waited 101ms and then acted
as if it was under 80ms?
2020-11-07 07:54:06 +01:00
Fabian Homborg
f58f2e14a3 tests/bind: Increase escape delay
We just had the following output on Github Actions:

 INPUT      +0.94 ms (Line 34): echo ghi jkl
 INPUT      +0.72 ms (Line 35): \x1b
 INPUT     +63.12 ms (Line 37): t\r

The default escape delay is 30ms, that had 60ms between an escape and
a tab, so it missed it.

So: We have to increase the delay for CI's benefit. Let's try with
80ms, because otherwise we'd have to bump up other timeouts and the
bind tests take long enough as it is.
2020-11-07 07:44:03 +01:00
Mahmoud Al-Qudsi
640f4444f5 Disable SIGIO notifier on WSL
It currently does not trigger the uvar notifier and fails the automated
tests.

See #7429.
2020-11-06 20:49:44 -06:00
Ayooluwa Isaiah
ea1dffd53d Add support for copy and paste in WSL
- clip.exe is used to copy to the Windows clipboard
- There's no binary for pasting from the Windows clipboard so
  `Get-Clipboard` from powershell is used as a workaround. The
  superflous carriage return is stripped from the output.
2020-11-06 22:10:04 +01:00
Fabian Homborg
69ab68d856 tests: Increase another timeout
Github Action's macOS builds are even more resource-starved (even tho
they use the same provider?) than
Travis, but Travis is unusable to us now, so....
2020-11-06 17:56:38 +01:00
Fabian Homborg
65c5433662 Delete unused field
Fixes #7456.

[ci skip]
2020-11-06 17:44:09 +01:00
ridiculousfish
d3192d37a2 Allow timing-out I/O-able syntax highlighting after expanding abbreviation
It may happen that the user types an abbreviation and then hits return.
Prior to this commit, we would perform a form of syntax highlighting
that does not require I/O, so as to not block the user. However this
could cause invalid commands to be colored as valid.

More generally if the user has e.g a slow NFS mount, then syntax
highlighting may lag behind the user's typing, and be incorrect at the
time the user hits return. This is an unavoidable race, since proper
syntax highlighting may take arbitrarily long.

Introduce a new function `finish_highlighting_before_exec`, which waits
for any outstanding syntax highlighting to complete, BUT has a timeout
(250 milliseconds). After this, it falls back to the no-I/O variant, which
colors all commands as valid and nothing as paths.

Fixes #7418
Fixes #5912
2020-11-05 20:07:05 -08:00
ridiculousfish
c861fdadcf Remove return value from iothread_perform
It was not actually used by any test.
2020-11-05 19:28:26 -08:00
Fabian Homborg
811ba586ea Github Actions: Try macOS again
Once more into the breach!

See #7447.
2020-11-02 21:04:36 +01:00
ridiculousfish
a2ff32d904 Stop caching line breaks in the prompt calculation
These are fast enough to find on demand.
2020-11-01 14:45:35 -08:00
Soumya
80aaae5b74 Clear to end of each line in left prompt 2020-11-01 13:29:26 -08:00
Fabian Homborg
2a07673561 Don't call a variable "stdin"
Musl has a macro that interferes.
2020-10-31 18:15:19 +01:00
Fabian Homborg
0951a706cf Let read read from fds other than 0
This allows

read </dev/tty

to work.

Fixes #7358
2020-10-31 13:39:20 +01:00
Sean Wei
ca0f5686ff Fix typo 2020-10-31 13:27:05 +01:00
Fabian Homborg
638cf61407 CHANGELOG cancel-undo 2020-10-30 19:37:44 +01:00
Fabian Homborg
d334dc6643 Let cancel after an unambiguous completion was accepted undo it
In some cases the completion we come up with may be unexpected, e.g.
if you have files like

/etc/realfile

and

/etc/wrongfile

and enter "/etc/gile", it will accept "wrongfile" because "g" and
"ile" are in there - it's a substring insertion match.

The underlying cause was a typo, so it should be easy to go back.

So we do a bit of magic and let "cancel" undo, but only right after a
completion was accepted via complete or complete-and-search.

That means that just reflexively pressing escape would, by default, get you back to
the old token and let you fix your mistake.

We don't do this when the completion was accepted via the pager,
because 1. there's more of a chance to see the problem there and 2.
it's harder to redo in that case.

Fixes #7433.
2020-10-30 19:37:44 +01:00
Jan-Jaap Korpershoek
4b74fbf1b7
Make mysql completions work with log-in (#7397)
Complete databases using credentials specified on the commandline.
2020-10-30 18:34:23 +01:00
Mahmoud Al-Qudsi
3471db51c8 [completions] Add completions for pidof
[ci skip]
2020-10-30 11:16:22 -05:00
Clément Martinez
5a0bc0a516 Add bluetoothctl completions 2020-10-30 16:38:26 +01:00
Akatsuki Rui
f73808a0fa
Add completions for homect (#7435)
systemd-homed control tool

based on the systemd v246.6-1 manpage
2020-10-30 04:25:54 +01:00
Fabian Homborg
6aa4f6b5ca CHANGELOG: Reorganize a bit
The builtin-buffering thing is huge and should be early in the big
ticket items, the performance improvement to completion of commands is
cool but not all that important.

[ci skip]
2020-10-28 20:13:58 +01:00
Akatsuki Rui
d9b39b0d51 hostnamectl.fish: new completion
systemd-hostnamed control tools
2020-10-28 19:38:45 +01:00