mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-14 17:07:44 +00:00
Bravely stop removing quotes in builtin history delete
The builtin history delete call has some code that removes a leading and
trailing quote from its arguments. This code dates back to ec34f2527a
,
when the builtin was introduced. It seems wrong and tests pass
without it. Let's bravely remove it.
This commit is contained in:
parent
76eef0fea9
commit
68ee2ff9f3
1 changed files with 1 additions and 4 deletions
|
@ -276,10 +276,7 @@ maybe_t<int> builtin_history(parser_t &parser, io_streams_t &streams, const wcha
|
|||
status = STATUS_INVALID_ARGS;
|
||||
break;
|
||||
}
|
||||
for (wcstring delete_string : args) {
|
||||
if (delete_string[0] == '"' && delete_string[delete_string.length() - 1] == '"') {
|
||||
delete_string = delete_string.substr(1, delete_string.length() - 2);
|
||||
}
|
||||
for (const wcstring &delete_string : args) {
|
||||
history->remove(delete_string);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue