3

Another small question. I just recently migrated to ZSH and, so far I am loving it! My question is how can I open a file using TextEdit so that I can edit it using a GUI? Make no mistake, Vim is an amazing command-line tool for editing files in the terminal along with nano.

Let's say that I wanted to open the .zshrc using vim :

vim ~/.zshrc

In the same way, open the .zshrc using nano:

nano ~/.zshrc

How can I open the same ~/.zshrc file using text edit through the terminal?

Thanks a lot and I really appreciate your help :)

XtremeDevX
  • 1,482
  • 2
  • 13
  • 38

3 Answers3

16

Here is the solution, I know it's a bit tedious but, you can open the ~/.zshrc using this command :

open -a TextEdit ~/.zshrc
XtremeDevX
  • 1,482
  • 2
  • 13
  • 38
0

Text Editor (gedit) is the default GUI text editor in the Ubuntu operating system. To open a specific file: gedit filename To open multiple files: gedit file1 file2 Here's More Information

0

The open utility has an option -e that opens the file in TextEdit (essentially a shorthand command).

open -e ~/.zshrc
Lukas
  • 1