Atom-shell-commands Problems (Windows 10)


#1

Hello,

I’m using Atom for the first time and have installed atom-shell-commands

I’m using Windows 10 and I have a folder in my C drive called C:\Pasmo and within this is my ZX Spectrum compiler called Pasmo.exe.

The way you run this is go into the folder and type pasmo.exe --tapebas input.asm output.tap

I have edited the configuration file so it includes:

  "atom-shell-commands":
    commands: [
      {
        name: "Pasmo Compile"
        command: "c:\pasmo\pasmo.exe --tapbas"
        arguments: [
          "{FilePath}"

          "{FileNameNoExt}.tap"
        ]
        options:
          cwd: "{FileDir}"
          save: true
          keymap: 'ctrl-2'
      }
    ]

So I start my loading up my assembly listing which is called scroll.asm from the Pasmo directory and when I press ‘Control 2’ I get this error:

["c:pasmopasmo.exe --tapbas","C:\\Pasmo\\scroll.asm","scroll.tap"]
Error: spawn c:pasmopasmo.exe --tapbas ENOENT
[Finished in 0.01 seconds, with code -4058]

Can anyone assist me? Thank you in advance.


#2

You have given yourself the answer: c:pasmopasmo.exe. What’s wrong with that? The \s disappear because \ by itself is used as an escape character. You need to write the command as C:\\pasmo\\pasmo.exe, so that the first \ escapes the second \ and a literal \ carries through.


#3

Thank you for the speedy reply. That helped.

So I have changed the code to:

  "atom-shell-commands":
    commands: [
      {
        name: "Pasmo Compile"
        command: "c:\\pasmo\\pasmo.exe --tapbas"
        arguments: [
          "{FileName}"

          "{FileNameNoExt}.tap"
        ]
        options:

          save: true
          keymap: 'ctrl-2'
      }
    ]

But I still get:

["c:\\pasmo\\pasmo.exe --tapbas","scroll.asm","scroll.tap"]
Error: spawn c:\pasmo\pasmo.exe --tapbas ENOENT
[Finished in 0.01 seconds, with code -4058]

Please note that in my first post in one place I incorrectly typed --tapebas it is as shown further down --tapbas

Thanks


#4

What I’m after is the equivalent of:

c:\pasmo\pasmo --tapbas scroll.asm scroll.tap

Run from the C:\Pasmo directory.


#5

Pass --tapbas as a standard argument. It’s not part of the command, hence you get the ENOENT error.

command: "c:\\pasmo\\pasmo.exe"
arguments: [
  "--tapbas"
  "{FileName}"
  "{FileNameNoExt}.tap"
]

#6

Thank you very much!