Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open .playground file in xcode via a terminal?

I just learned the basics of the Terminal, so I was trying to open a file named trees.playground by following command:

open trees.playground

But terminal says:

No application knows how to open trees.playground.

How to make the terminal aware that XCode can open such file?

like image 529
Mayur Tolani Avatar asked Jan 05 '23 15:01

Mayur Tolani


1 Answers

Xcode should be the default opening application for .playground files. So following command should work:

open trees.playground

If it still does not, you can just force terminal to open it with Xcode like following:

open -a Xcode trees.playground

To make you understand the above mentioned command, I will break it down:

open [Open something]
-a [With application]
Xcode [Name of desired application]
trees.playground [This file]

In Verbose form, it would mean "Open tree.playground with an application named Xcode".

like image 60
NSNoob Avatar answered Jan 15 '23 07:01

NSNoob