mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-02 05:41:16 -03: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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user