mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-26 02:13:38 +08:00
history: Refuse to merge in private mode
It makes *no* sense. Fixes #9050.
This commit is contained in:
parent
80fe0a7fcb
commit
bd7934ccbf
|
@ -305,6 +305,12 @@ maybe_t<int> builtin_history(parser_t &parser, io_streams_t &streams, const wcha
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (in_private_mode(parser.vars())) {
|
||||||
|
streams.err.append_format(
|
||||||
|
_(L"%ls: can't merge history in private mode\n"), cmd);
|
||||||
|
status = STATUS_INVALID_ARGS;
|
||||||
|
break;
|
||||||
|
}
|
||||||
history->incorporate_external_changes();
|
history->incorporate_external_changes();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,3 +66,7 @@ builtin history -t merge
|
||||||
# Now do a history command that should succeed so we exit with a zero,
|
# Now do a history command that should succeed so we exit with a zero,
|
||||||
# success, status.
|
# success, status.
|
||||||
builtin history save
|
builtin history save
|
||||||
|
|
||||||
|
set -g fish_private_mode 1
|
||||||
|
builtin history merge
|
||||||
|
#CHECKERR: history: can't merge history in private mode
|
||||||
|
|
Loading…
Reference in New Issue
Block a user