summaryrefslogtreecommitdiffstats
path: root/pkg/commands
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2023-03-28 18:19:03 +0200
committerStefan Haller <stefan@haller-berlin.de>2023-04-13 13:14:00 +0200
commit08d679c3a8524610e3f30e8d5ece71d522d70c68 (patch)
treec1936d1909cd86cd95ac444510bcff5db735d8be /pkg/commands
parent2947b5613417a38a09cd8ac0ede49eff78d80ec6 (diff)
Remove line number support for "open" command
The "open" command is supposed to behave in the same way as double-clicking a file in the Finder/Explorer. The concept of jumping to a specific line in the file doesn't make sense for this; use "edit" instead.
Diffstat (limited to 'pkg/commands')
-rw-r--r--pkg/commands/oscommands/os.go5
1 files changed, 0 insertions, 5 deletions
diff --git a/pkg/commands/oscommands/os.go b/pkg/commands/oscommands/os.go
index 39149ce84..11c964ca4 100644
--- a/pkg/commands/oscommands/os.go
+++ b/pkg/commands/oscommands/os.go
@@ -78,14 +78,9 @@ func FileType(path string) string {
}
func (c *OSCommand) OpenFile(filename string) error {
- return c.OpenFileAtLine(filename, 1)
-}
-
-func (c *OSCommand) OpenFileAtLine(filename string, lineNumber int) error {
commandTemplate := c.UserConfig.OS.OpenCommand
templateValues := map[string]string{
"filename": c.Quote(filename),
- "line": fmt.Sprintf("%d", lineNumber),
}
command := utils.ResolvePlaceholderString(commandTemplate, templateValues)
return c.Cmd.NewShell(command).Run()