Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3d7011e

Browse files
committed
Add vscode to config command editor stack and enable passing in an arbitrary editor
1 parent3d2e443 commit3d7011e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎commands/config.go‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ import (
1212

1313
var (
1414
configCmd=&cobra.Command{
15-
Use:"config",
15+
Use:"config [editor]",
1616
Short:"Edit config file",
1717
Run:func(cmd*cobra.Command,args []string) {
18+
editors=append(args,editors...)
19+
1820
ifeditor:=findEditor();editor!="" {
1921
process:=exec.Command(editor,storage.Path.Config())
2022
process.Stdin=os.Stdin
@@ -27,7 +29,7 @@ var (
2729
},
2830
}
2931

30-
editors= []string{"nano","notepad","vi","emacs"}
32+
editors= []string{"nano","code","vi","emacs","notepad"}
3133
)
3234

3335
funcfindEditor()string {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp