mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
abbr: Warn when -U
is given
This prints a warning to stderr and then still does the thing. Because of the error trailer, it points to the abbr help page.
This commit is contained in:
parent
5c56fa0e6f
commit
da0c640750
1 changed files with 7 additions and 1 deletions
|
@ -393,9 +393,15 @@ maybe_t<int> builtin_abbr(parser_t &parser, io_streams_t &streams, const wchar_t
|
|||
opts.list = true;
|
||||
break;
|
||||
case 'g':
|
||||
case 'U':
|
||||
// Kept for backwards compatibility but ignored.
|
||||
// This basically does nothing now.
|
||||
break;
|
||||
case 'U': {
|
||||
// Kept and made ineffective, so we warn.
|
||||
streams.err.append_format(_(L"%ls: Warning: Option '%ls' was removed and is now ignored"), cmd, argv[w.woptind - 1]);
|
||||
builtin_print_error_trailer(parser, streams.err, cmd);
|
||||
break;
|
||||
}
|
||||
case 'h': {
|
||||
builtin_print_help(parser, streams, cmd);
|
||||
return STATUS_CMD_OK;
|
||||
|
|
Loading…
Reference in a new issue