From 7d51364584e9081f71f4691a713bb737f7573a74 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Wed, 25 Mar 2020 07:19:44 +0900 Subject: Revert "Remove ! from commands" This reverts commit f7479c36ad0883455e511a86adf86e147ff4460a. --- src/console/commandline/CommandParser.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/console/commandline/CommandParser.ts') diff --git a/src/console/commandline/CommandParser.ts b/src/console/commandline/CommandParser.ts index 79ae8c8..5228c77 100644 --- a/src/console/commandline/CommandParser.ts +++ b/src/console/commandline/CommandParser.ts @@ -8,8 +8,6 @@ export class UnknownCommandError extends Error { export default class CommandParser { parse(value: string): Command { - value = value.replace(/!$/, ""); - switch (value) { case 'o': case 'open': @@ -27,8 +25,14 @@ export default class CommandParser { case 'bdel': case 'bdelete': return Command.BufferDelete; + case 'bd!': + case 'bdel!': + case 'bdelete!': + return Command.BufferDeleteForce; case 'bdeletes': return Command.BuffersDelete; + case 'bdeletes!': + return Command.BuffersDeleteForce; case 'addbookmark': return Command.AddBookmark; case 'q': -- cgit v1.2.3