mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-28 12:13:55 +08:00
8bf8b10f68
See the changelog additions for user-visible changes. Since we enable/disable terminal protocols whenever we pass terminal ownership, tests can no longer run in parallel on the same terminal. For the same reason, readline shortcuts in the gdb REPL will not work anymore. As a remedy, use gdbserver, or lobby for CSI u support in libreadline. Add sleep to some tests, otherwise they fall (both in CI and locally). There are two weird failures on FreeBSD remaining, disable them for now https://github.com/fish-shell/fish-shell/pull/10359/checks?check_run_id=23330096362 Design and implementation borrows heavily from Kakoune. In future, we should try to implement more of the kitty progressive enhancements. Closes #10359
73 lines
2.7 KiB
Fish
73 lines
2.7 KiB
Fish
#RUN: %fish %s | %filter-ctrlseqs
|
|
# Verify that specifying unexpected options or arguments results in an error.
|
|
|
|
# First using the legacy, now deprecated, long options to specify a
|
|
# subcommand.
|
|
|
|
# First with the history function.
|
|
history --search --merge
|
|
#CHECKERR: history: merge search: options cannot be used together
|
|
history --clear --contains
|
|
#CHECKERR: history: clear: subcommand takes no options
|
|
history --merge -t
|
|
#CHECKERR: history: merge: subcommand takes no options
|
|
history --save xyz
|
|
#CHECKERR: history: save: expected 0 arguments; got 1
|
|
|
|
# Now with the history builtin.
|
|
builtin history --save --prefix
|
|
#CHECKERR: history: save: subcommand takes no options
|
|
builtin history --clear --show-time
|
|
#CHECKERR: history: clear: subcommand takes no options
|
|
builtin history --merge xyz
|
|
#CHECKERR: history: merge: expected 0 arguments; got 1
|
|
builtin history --clear abc def
|
|
#CHECKERR: history: clear: expected 0 arguments; got 2
|
|
|
|
# Now using the preferred subcommand form. Note that we support flags before
|
|
# or after the subcommand name so test both variants.
|
|
|
|
# First with the history function.
|
|
history clear --contains
|
|
#CHECKERR: history: clear: subcommand takes no options
|
|
history clear-session --contains
|
|
#CHECKERR: history: clear-session: subcommand takes no options
|
|
history merge -t
|
|
#CHECKERR: history: merge: subcommand takes no options
|
|
history save xyz
|
|
#CHECKERR: history: save: expected 0 arguments; got 1
|
|
history --prefix clear
|
|
#CHECKERR: history: clear: subcommand takes no options
|
|
history --prefix clear-session
|
|
#CHECKERR: history: clear-session: subcommand takes no options
|
|
history --show-time merge
|
|
#CHECKERR: history: merge: subcommand takes no options
|
|
|
|
# Now with the history builtin.
|
|
builtin history --search --merge
|
|
#CHECKERR: history: search merge: options cannot be used together
|
|
builtin history save --prefix
|
|
#CHECKERR: history: save: subcommand takes no options
|
|
builtin history clear --show-time
|
|
#CHECKERR: history: clear: subcommand takes no options
|
|
builtin history clear-session --show-time
|
|
#CHECKERR: history: clear-session: subcommand takes no options
|
|
builtin history merge xyz
|
|
#CHECKERR: history: merge: expected 0 arguments; got 1
|
|
builtin history clear abc def
|
|
#CHECKERR: history: clear: expected 0 arguments; got 2
|
|
builtin history clear-session abc def
|
|
#CHECKERR: history: clear-session: expected 0 arguments; got 2
|
|
builtin history --contains save
|
|
#CHECKERR: history: save: subcommand takes no options
|
|
builtin history -t merge
|
|
#CHECKERR: history: merge: subcommand takes no options
|
|
|
|
# Now do a history command that should succeed so we exit with a zero,
|
|
# success, status.
|
|
builtin history save
|
|
|
|
set -g fish_private_mode 1
|
|
builtin history merge
|
|
#CHECKERR: history: can't merge history in private mode
|