implement cmap for command line mapping
This commit is contained in:
1 parent
0969514f10
commit
3fd1222e4f
7 files changed
+191
-97
No files matched your search
@@ -139,6 +139,14 @@ func (e *mapExpr) eval(app *app, args []string) {
|
||||
gOpts.keys[e.keys] = e.expr
|
||||
}
|
||||
|
||||
func (e *cmapExpr) eval(app *app, args []string) {
|
||||
if e.cmd == "" {
|
||||
delete(gOpts.cmdkeys, e.key)
|
||||
return
|
||||
}
|
||||
gOpts.cmdkeys[e.key] = &callExpr{e.cmd, nil}
|
||||
}
|
||||
|
||||
func (e *cmdExpr) eval(app *app, args []string) {
|
||||
if e.expr == nil {
|
||||
delete(gOpts.cmds, e.name)
|
||||
|
||||
Reference in new issue
Block a user