Skip to content

Commit b8148ec

Browse files
mbaumanStefanKarpinski
authored andcommitted
Add editor line support and write-only support for rmate (#32357)
I often use [rmate](https://github.com/aurora/rmate) to support working on remote systems -- this adds line number support as well as uses the `-f` flag to force it to open read-only files
1 parent 49fc01a commit b8148ec

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

stdlib/InteractiveUtils/src/editless.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ function edit(path::AbstractString, line::Integer=0)
5252
cmd = line != 0 ? `$command +$line $path` : `$command $path`
5353
elseif name == "textmate" || name == "mate" || name == "kate"
5454
cmd = line != 0 ? `$command $path -l $line` : `$command $path`
55+
elseif name == "rmate"
56+
cmd = line != 0 ? `$command $path -l $line -f` : `$command $path -f`
5557
elseif startswith(name, "subl") || startswith(name, "atom")
5658
cmd = line != 0 ? `$command $path:$line` : `$command $path`
5759
elseif name == "code" || (Sys.iswindows() && (uppercase(name) == "CODE.EXE" || uppercase(name) == "CODE.CMD"))

0 commit comments

Comments
 (0)