diff options
Diffstat (limited to 'src/shared/Command.ts')
-rw-r--r-- | src/shared/Command.ts | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/src/shared/Command.ts b/src/shared/Command.ts index b8c21ce..05b8b83 100644 --- a/src/shared/Command.ts +++ b/src/shared/Command.ts @@ -1,40 +1,40 @@ export enum Command { - Open = "open", - TabOpen = "tabopen", - WindowOpen = "winopen", - Buffer = "buffer", - BufferDelete = "bdelete", - BufferDeleteForce = "bdelete!", - BuffersDelete = "bdeletes", - BuffersDeleteForce = "bdeletes!", - AddBookmark = "addbookmark", - Quit = "quit", - QuitAll = "quitall", - Set = "set", - Help = "help", + Open = "open", + TabOpen = "tabopen", + WindowOpen = "winopen", + Buffer = "buffer", + BufferDelete = "bdelete", + BufferDeleteForce = "bdelete!", + BuffersDelete = "bdeletes", + BuffersDeleteForce = "bdeletes!", + AddBookmark = "addbookmark", + Quit = "quit", + QuitAll = "quitall", + Set = "set", + Help = "help", } export namespace Command { export function members(): Command[] { return [ - Command.Open , - Command.TabOpen , - Command.WindowOpen , - Command.Buffer , - Command.BufferDelete , - Command.BufferDeleteForce , - Command.BuffersDelete , - Command.BuffersDeleteForce , - Command.AddBookmark , - Command.Quit , - Command.QuitAll , - Command.Set , - Command.Help , - ] + Command.Open, + Command.TabOpen, + Command.WindowOpen, + Command.Buffer, + Command.BufferDelete, + Command.BufferDeleteForce, + Command.BuffersDelete, + Command.BuffersDeleteForce, + Command.AddBookmark, + Command.Quit, + Command.QuitAll, + Command.Set, + Command.Help, + ]; } export function valueOf(value: string): Command { - const map = new Map(members().map(cmd => [cmd.toString(), cmd])); + const map = new Map(members().map((cmd) => [cmd.toString(), cmd])); const cmd = map.get(value); if (!cmd) { throw new Error(`unknown command '${value}`); |