Specify flag location in execution paths


#1

I’m experimenting with writing code in Bash on Ubuntu on Windows 10, and I want to be able to specify where the flags are placed in execution paths. For example: bash -c "clang {flags here inside quotes}" Does anyone know how to do this?


#2

I’m not sure what this has to do with Atom?


#3

I’m trying to run it from Atom. Does Atom not have anything that lets you specify where flags go?


#4

You didn’t need to link back to the atom homepage. These are the atom forums, I’m not a complete idiot.


#5

I’m sorry if my reaction was a bit over-the-top, I’m not having the best day. I just didn’t mention Atom in the OP because I assumed it was implied by the forum. Sorry.


#6

Some of the topics on this forum pertain to Electron apps generally (in the Electron category), so a question about running a shell command or porting across platforms without further detail is too vague to be immediately helpful.

What package are you using to execute shell commands?


#7

It’s actually not porting, it’s basically reverse WINE. The package I was trying to tackle first was linter-clang.


#8

Okay. Without that context, it sounded like you were developing on Windows for Bash on Ubuntu. I’m still not sure what the problem is. You’re calling Bash from cmd.exe? Are the flags not in the same order you enter them? If not, it may be useful to create a shell script and run that, but it sounds like your issue is outside the scope of Atom.


#9

Let me try explaining the entire thing, I’m bad at explaining things.

  1. In the Windows Insider Previews, there is a way to run Linux programs on Windows without a VM
  2. Linux programs can be run from bash or all the regular windows ways with bash -c "command"
  3. I want to run clang from Atom, but the flags have to be placed inside the quotes around "command" to work.

#10

Which brings me back to my original question: what package are you using to give Atom the ability to execute commands? Are the default flag setting fields not sufficient for what you want to do? If so, why not?


#11

In linter-clang, you can specify what the package should run to get clang, but it just runs that by tacking on flags after the executable. I need to ba able to place flags inside the quotes, as I explained earlier.


#12

Usually precise questions about the usage of a plugin are best posted on that plugin page.

For example: bash -c “clang {flags here inside quotes}”

If you look at linter-clang source code you’ll see it’s building a command line then pass it to some exec function … that eventually map to node.js child_process spawn functionality. At no point in this process there is a call to bash. The whole executed path is already the content of the quote - there is no quote.


#13

Usually precise questions about the usage of a plugin are best posted on that plugin page.

It’s not specific to the package, that’s just my example.

At no point in this process there is a call to bash. The whole executed path is the content of the quote.

I want to replace the default clang {flags} call with a bash -c "clang {flags}", I just don’t know how to get atom to put the flags in the right place.


#14

It’s not specific to the package, that’s just my example.

There’s no central repository of what external command is called where, so yes it’ll probably be specific to the package and on a case-by-base basis.

I want to replace the default clang {flags} call with a bash -c “clang {flags}”

Likely this require changing the code at a few place. Hence why I proposed you to open an issue on the linter-clang package.


#15

It’s very specific to the package. Given the nature of Node, almost all packages that double as command line tools will probably work just as well when executed by a Windows shell as by a Linux one. Many packages wrap their execution up tight and just offer checkboxes for settings.

If you want Atom to execute all command line actions through Bash for Ubuntu for Windows, that’s beyond the scope of a simple support request.