Open file from terminal

Similar to code example.txt or vim example.txt, repl example.txt (or whatever yalls choose to name this) should open example.txt in a CodeMirror editor.

hi @lawrencecchen Are you talking about terminal or shell because if you want to open an item in the terminal you can just use this code snippet below

open("file.txt", "w").write("Hello World")
read = open("file.txt").read()
print(read)

output would look like this

Hello World

or did you mean something else

1 Like

What he wants is a command that you can type in the shell that opens a new tab in the Replit editor with the specified file.

So for example, repl open file.txt would open a new file tab so you can edit it.
Similar to how the code command opens VSCode with the specified file/folder.

2 Likes

@LuisAFK @lawrencecchen yeah lol that makes more sense