With Visual Studio Code and other text editors, we can directly open the editor from the terminal shell with the current folder opened as a project.

For example, I can change to a folder and start it like this:

1
2
$ cd myfolder
$ code .

To make GoLand support the same workflow, we can do the following steps.

1. Create Launcher Script

Open GoLand and click the top menu Tools >> Create Command-line Launcher...

Select where to save the GoLand command-line launcher.

Save the launcher file in your preferred location, or leave it as is by default. In my example it’s saved as /usr/local/bin/goland

Saved goland launcher file

2. Create alias pointing to the launcher file

1
alias goland='/usr/local/bin/goland'

Reopen terminal (or source the file) and we’re ready. Now you can type:

1
2
$ cd myfolder
$ goland .