Skip to content

Commit d19e6da

Browse files
authored
Merge branch 'main' into master
2 parents 52ece72 + 64ad7f4 commit d19e6da

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

internal/adapter/editor/editor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func (e *Editor) Open(paths ...string) error {
3939
// initial note content to `zk new`. Without this, Vim doesn't work
4040
// properly in this case.
4141
// See https://github.com/zk-org/zk/issues/4
42-
cmd := executil.CommandFromString(e.editor + " " + shellquote.Join(paths...) + " </dev/tty")
42+
cmd := executil.CommandFromString(e.editor + " " + shellquote.Join(paths...) + CMD_SUFFIX)
4343
cmd.Stdin = os.Stdin
4444
cmd.Stdout = os.Stdout
4545
cmd.Stderr = os.Stderr
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
//go:build windows
2+
3+
package editor
4+
5+
const CMD_SUFFIX = ""

internal/adapter/editor/suffix.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
//go:build !windows
2+
3+
package editor
4+
5+
const CMD_SUFFIX = " </dev/tty"

internal/adapter/fzf/note_filter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func (f *NoteFilter) Apply(notes []core.ContextualNote) ([]core.ContextualNote,
9898
bindings = append(bindings, Binding{
9999
Keys: newBinding,
100100
Description: "create a note with the query as title" + suffix,
101-
Action: fmt.Sprintf(`abort+execute("%s" new "%s" --title {q} < /dev/tty > /dev/tty)`, zkBin, dir.Path),
101+
Action: fmt.Sprintf(`become("%s" new "%s" --title {q} < /dev/tty > /dev/tty)`, zkBin, dir.Path),
102102
})
103103
}
104104
}

0 commit comments

Comments
 (0)