vscode-commandbar icon indicating copy to clipboard operation
vscode-commandbar copied to clipboard

Q: launch in terminal

Open lonix1 opened this issue 6 years ago • 3 comments

I'm using linux. How can I launch a terminal and run a command in it?

lonix1 avatar Mar 04 '19 07:03 lonix1

Okay figured it out...

"command": "gnome-terminal --working-directory=/foo/bar/baz command arg1 arg2",

What we need is a macro like ${projectdir} that resolves to the project's root. So we can use relative paths for stuff within the project. e.g.:

"command": "gnome-terminal --working-directory=${projectdir}/baz --command 'command arg1 arg2'",

lonix1 avatar Mar 04 '19 07:03 lonix1

Okay figured it out...

"command": "gnome-terminal --working-directory=`pwd`/foo/bar --command 'command arg1 arg2'"

Though this could be made simpler.

lonix1 avatar Mar 04 '19 07:03 lonix1

@lonix1 Can you please either suggest how this can be made simpler with this extension (possibly as new issue) and/)or close this issue as it is "question only"?

GitMensch avatar Jan 27 '21 08:01 GitMensch