(editorCommand string)
| 160 | } |
| 161 | |
| 162 | func EditorName(editorCommand string) string { |
| 163 | if editorCommand == "" { |
| 164 | editorCommand = defaultEditor |
| 165 | } |
| 166 | if args, err := shellquote.Split(editorCommand); err == nil { |
| 167 | editorCommand = args[0] |
| 168 | } |
| 169 | return filepath.Base(editorCommand) |
| 170 | } |
no test coverage detected