diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-03-14 22:34:34 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-03-14 22:34:34 -0400 |
commit | 62946ff6c5712bebf7f07a83fc077d40db0e73a8 (patch) | |
tree | d135e824abb0faf5d2a0baa70a0ae6b9bb8b5ebc /commands/commands.go | |
parent | de364846ccaba3b93c383add3846443048f1c2c9 (diff) | |
download | aerc-62946ff6c5712bebf7f07a83fc077d40db0e73a8.tar.gz |
Implement :cd command
Diffstat (limited to 'commands/commands.go')
-rw-r--r-- | commands/commands.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/commands/commands.go b/commands/commands.go index 49a8b46..2890cdd 100644 --- a/commands/commands.go +++ b/commands/commands.go @@ -14,11 +14,10 @@ var ( commands map[string]AercCommand ) -func init() { - commands = make(map[string]AercCommand) -} - func Register(name string, cmd AercCommand) { + if commands == nil { + commands = make(map[string]AercCommand) + } commands[name] = cmd } |