elementary / code

Code editor designed for elementary OS
https://elementary.io
GNU General Public License v3.0
470 stars 112 forks source link

Create files from Terminal in current working directory #285

Open SubhadeepJasu opened 6 years ago

SubhadeepJasu commented 6 years ago

1) Scratch always creates new file in ~\ directory when running scratch-text-editor file command. Scratch should create new files in the current working directory where the terminal is opened. So if we hit cd ~/Documents/ && scratch-text-editor newFile.txt, scratch should open the file in ~/Documents instead of ~/. (This is a problem only when creating a new file via terminal, ie when the specified file does not exist.)

~2) Shorten the terminal command for scratch. Just scratch is much better than scratch-text-editor. If scratch if re-branded to Code (as envisioned by Daniel Fore) then the command would be anything other than code because Visual Studio Code uses the command code too. So anything like ecode or gcode or any short name should be good.~

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/52330031-create-files-from-terminal-in-current-working-directory?utm_campaign=plugin&utm_content=tracker%2F61917289&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F61917289&utm_medium=issues&utm_source=github).
cassidyjames commented 6 years ago

@SubhadeepJasu this is two separate issues. I'll keep this issue as the first point, but the second point is moot because elementary is RDNNing all apps. You're welcome to set up an alias to whatever you'd like, though.

SubhadeepJasu commented 6 years ago

Thanks! I still feel that any command shorter than io.elementary.code could have been easier to write in terminal. Or may be I am just lazy lol. No problem.

pantor commented 6 years ago

I can't reproduce this issue, is it sill unsettled?

krontzo commented 5 years ago

I can confirm it happens. I just downloaded eOS Juno and installed all updates/upgrades.

I am using this alias as a very simple quick workaround:

alias ecode="io.elementary.code $PWD/"

So I can call one file in the current working directory:

ecode main.cpp