From f7479c36ad0883455e511a86adf86e147ff4460a Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Wed, 25 Mar 2020 07:01:59 +0900 Subject: Remove ! from commands --- src/console/commandline/CommandParser.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/console') diff --git a/src/console/commandline/CommandParser.ts b/src/console/commandline/CommandParser.ts index 5228c77..79ae8c8 100644 --- a/src/console/commandline/CommandParser.ts +++ b/src/console/commandline/CommandParser.ts @@ -8,6 +8,8 @@ export class UnknownCommandError extends Error { export default class CommandParser { parse(value: string): Command { + value = value.replace(/!$/, ""); + switch (value) { case 'o': case 'open': @@ -25,14 +27,8 @@ 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