Fabian Homborg
a121833e88
argparse: Only print stacktrace when it's an error in argparse usage
...
A broken/missing optspec or `--` is a bug in the script using
argparse, an unknown option or invalid argument is a bug in using that script.
So in the former case print a stacktrace, because the person writing
the `argparse` call is at fault, in the latter don't.
Fixes #6703 .
2020-06-17 20:05:48 +02:00
Fabian Homborg
4660be372a
Only disable title in emacs "term"
...
There's more than one emacs terminal (for some reason), and term is
the most broken one and can't even handle a title.
Fixes #7122 .
2020-06-17 16:48:13 +02:00
Fabian Homborg
00f7cdae62
tests: Don't send \cA
...
Breaks the tests in screen.
Fixes #7111 .
2020-06-17 15:55:31 +02:00
Fabian Homborg
547f649797
docs: Slight reword of argparse's optional argument section
...
[ci skip]
2020-06-17 15:36:50 +02:00
David Adam
bc68ada893
fish.spec: drop _docdir entirely
...
The _docdir and _pkgdocdir macros are too variable between systems, and
the CMake macros do not use them at all; define the path directly.
2020-06-17 20:59:17 +08:00
Gokul
dde7ee9c7d
Add completions for github's gh tool
2020-06-17 20:27:20 +08:00
David Adam
897bd62adf
fish.spec: use _docdir macro more reliably
...
_pkgdocdir contains the version on some platforms but not others.
2020-06-16 07:09:39 +08:00
David Adam
b1b5f5f0ba
fish.spec: drop fish-internal mandir, already included elsewhere
...
Fixes "File listed twice" warnings.
2020-06-16 07:09:39 +08:00
Gokul
9b10636824
Make completion descriptions for feh shorter
...
Strikes off feh in #6981 .
2020-06-15 21:55:47 +08:00
David Adam
7838b47e6b
docs: formatting fixes in initialization section
2020-06-15 21:46:20 +08:00
David Adam
5dd7944d0b
faq: add SSH/SFTP/SCP interactive guard suggestions
...
See #2160 , #2405 , #3742 , #4432 & #4745 , among others.
2020-06-15 21:46:20 +08:00
Fabian Homborg
c88e66199d
CHANGELOG: Document pexpect dependency
...
[ci skip]
2020-06-14 19:30:03 +02:00
Fabian Homborg
52a6574751
tests: Use status dirname
2020-06-14 19:30:03 +02:00
Fabian Homborg
c7efe46e0b
README: The gettext command is no longer required
...
`_` is now a proper builtin, so we don't spuriously call out to gettext.
2020-06-14 19:30:03 +02:00
Fabian Homborg
deb816c91c
README: Mention python3 and pexpect for the tests
...
Technically the script tests could probably be run with 2.7, but the
README doesn't need to be that exhaustive.
[ci skip]
2020-06-14 19:30:03 +02:00
Shun Sakai
ffaf969e6e
Add completions for apk-tools
...
Completion of options for each subcommand is not implemented.
2020-06-14 19:23:49 +02:00
Maciek Borzecki
47200a8abf
completions/snap: workaround snap interfaces deprecation notice
...
The `snap interfaces` command prints out a deprecation notice to stderr. This breaks the completion
support for interfaces, connect and disconnect commands like so:
```
$ snap connect <TAB>error: no interfaces found
error: no interfaces found
...
'snap interfaces' is deprecated; use 'snap connections'.
'snap interfaces' is deprecated; use 'snap connections'.
'snap interfaces' is deprecated; use 'snap connections'.
error: no interfaces found
error: no interfaces found
'snap interfaces' is deprecated; use 'snap connections'.
```
Ultimately, the snap command completion should switch to `snap connections`. However, for now try to
workaround the notice by redirecting stderr.
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
2020-06-14 19:22:37 +02:00
Shun Sakai
991389603c
Add completions for xxHash
2020-06-14 19:22:01 +02:00
Fabian Homborg
e0f5fc2cb4
Remove some leftover test files
2020-06-13 20:43:12 +02:00
Fabian Homborg
cfa2927610
pexpect: Show last 10 lines on failure
...
This was sometimes slightly annoying in porting.
5 is enough most of the time, 10 should be enough basically always,
without being too annoying if you don't need it.
2020-06-13 19:53:21 +02:00
Fabian Homborg
aa7316b6c6
checks/read: Print maximum if we fail to read it
...
Debugging here is a bit difficult.
2020-06-13 19:53:21 +02:00
Fabian Homborg
87876f19a7
srht builds: Switch to pexpect
...
Alpine uses pip, also needs an explicit "python3" now.
FreeBSD requires an explicit "py37" apparently. Blergh.
2020-06-13 19:52:47 +02:00
Fabian Homborg
87a1e4f8b9
Remove expect
...
This should remove the last bits of expect from the codebase.
2020-06-13 19:28:42 +02:00
Fabian Homborg
c6dffa226f
Port history test to pexpect
2020-06-13 19:24:36 +02:00
Fabian Homborg
5478d979a0
pexpect: Consume color sequences in expect_prompt
...
We typically use TERM=dumb, but in some cases we need actual cursor
and color stuff.
2020-06-13 19:18:12 +02:00
Fabian Homborg
51e3258dbe
Port histfile test to pexpect
2020-06-13 18:53:01 +02:00
Fabian Homborg
25a73a77bb
Unset X-bit on tests
...
These files are not expected to be run directly.
2020-06-13 16:18:17 +02:00
Fabian Homborg
93c3aaf5f4
Port signals test to pexpect
2020-06-13 15:38:54 +02:00
Fabian Homborg
c11457f2db
Port job_summary test to pexpect
2020-06-13 15:21:40 +02:00
Fabian Homborg
a6a1c6e775
Port read tests to expect
...
Note: This includes a super cheesy thing to print variable contents.
The expect version has one that's a bit more elaborate (featuring a
marker setup), but tbh that doesn't seem to be worth it.
If we do need it, we can add it, but it seems more likely we'd just do
`set -S`, or do it in a check instead.
2020-06-13 15:21:40 +02:00
Fabian Homborg
aafdaea2f9
Port wait test to pexpect
2020-06-13 15:21:40 +02:00
David Adam
68db32255a
fish.spec: build depends on Python 3 on all platforms except RHEL 6
2020-06-12 23:54:29 +08:00
Fabian Homborg
d9b0a3b272
Revert "docs/tutorial: Fix duplicate sentence"
...
This reverts commit 9d1129f14c
.
Probably a bad rebase, at the time this appeared on master the sentence was already removed.
2020-06-11 18:40:35 +02:00
David Adam
71f7a3abf4
fish.spec: override overzealous version format linting
2020-06-11 17:23:23 +08:00
Fabian Homborg
5cae62a266
docs: Document comments
...
Turns out they weren't.
Fixes #7106 .
2020-06-10 17:39:04 +02:00
ridiculousfish
e91a06b764
Correct a misspeeling
2020-06-09 19:57:04 -07:00
ridiculousfish
269f907f2f
Use inline ivar initialization in parse_node_t
2020-06-09 15:16:31 -07:00
ridiculousfish
19293ec2d6
Make parse_keyword_t an enum class
2020-06-09 15:13:02 -07:00
ridiculousfish
b4351c5927
Clean up posix_spawn code paths
...
Prior to this change, the posix_spawn code paths used a fair amount of
manual management around its allocated structures (attrs and file actions).
Encapsulate this into a new class that manages memory management and error
handling.
2020-06-09 14:59:06 -07:00
Lennard Hofmann
1b90be57f2
Add foot to update_cwd_osc
...
See https://codeberg.org/dnkl/foot
2020-06-09 12:49:33 -07:00
Fabian Homborg
15a789dda0
Fix fkr tests
...
I had fish_key_reader *installed*, so this worked for me.
But really we have the path in $fish_key_reader, so we want to use
that variable.
2020-06-08 23:19:57 +02:00
Fabian Homborg
f66edfdec2
Port generic.expect to pexpect
...
Removes a dumb workaround. Huzzah!
2020-06-08 22:57:46 +02:00
Fabian Homborg
339a5a2196
Port fkr expect to pexpect
2020-06-08 22:52:18 +02:00
Fabian Homborg
e094e770e8
docs: Some more work on fish_for_bash_users
...
[ci skip]
2020-06-08 20:44:56 +02:00
Fabian Homborg
cbefdb775d
tests: Sleep for a bit
...
Gosh dangit Travis
2020-06-08 18:49:03 +02:00
Fabian Homborg
a4a4a2e1b6
__fish_print_packages: Fix apt
...
On my system this printed just "Description:" without any additional
characters, so this awkward `sed` didn't match and produced *all
packages on one line*.
Tbh this should probably be rewritten, but first we'd have to find a
way to get proper output here.
2020-06-08 18:32:52 +02:00
Fabian Homborg
983f9eaa50
completions/apt: Let autoremove take packages
...
Fixes #7095
[ci skip]
2020-06-08 17:43:23 +02:00
Fabian Homborg
83808929a7
Remove pipestatus expect test
...
This doesn't really do more than the check of the same name.
2020-06-08 17:34:43 +02:00
Fabian Homborg
10fbdd34e7
Reformat pexpects
...
These are now python scripts
2020-06-08 17:33:04 +02:00
Fabian Homborg
3c6055c3e0
Move exit test to pexpect
...
This needs some subprocess magic, but otherwise it's nicely straightforward.
2020-06-08 17:31:18 +02:00