Config file problem related to atom-shell-commands


#1

I’m not sure whether it’s OK to discuss package specific issues here, but this isn’t directly related to the package itself, so hopefully this will be acceptable. There’s an open issue on this in the package repo, but there hasn’t been any reply on it for almost a month, so maybe somebody here will have some ideas.

The package atom-shell-commands requires setting up the commands in the user config file. However, for some reason which is beyond me, the commands get stripped by Atom as soon as the config file is saved, although as far as I can tell they’re formatted correctly and there shouldn’t be any issues.

For the sake of discussion, the config I use is a direct copy-paste from the example in the package readme:

  "atom-shell-commands":
    commands: [
      {
        name: "compile"
        command: "d:/dev/mingw/bin/gcc"
        arguments: [
          "{FileName}"
          "-o"
          "{FileNameNoExt}.exe"
        ]
        options:
          cwd: "{FileDir}"
          keymap: 'ctrl-2'
      }
    ]

As soon as I save the config file, the contents are stripped and all I’m left with are empty curly braces:

  "atom-shell-commands": {}

Am I missing something regarding the formatting or syntax of the config file?

The relevant issue on the package repo can be found here:


#2

I’m afraid I can’t help with this particular issue. The project at least still seems to be active, so there’s a good chance that the issue will be addressed.

In the mean time you can perhaps use process-palette. Its features are similar to atom-shell-commands’, so you should be able to do the same with it.


#3

That package looks great, I’ll give it a go. Thanks!


#4

It’s perfectly okay, but there are thousands of packages and people here aren’t necessarily familiar with the workings of most of them, so it’s a craps shoot.

As soon as I save the config file, the contents are stripped and all I’m left with are empty curly braces

Atom doesn’t do this. It definitely seems like an issue with the package. For some reason, it appears to be aggressively unsetting everything under atom-shell-commands. However, I have no familiarity with the package (I’ve been using process-palette), so I can’t tell you any more than that.


#5

Yes. I should’ve easily realized this wasn’t an Atom issue by trying the same config with the package disabled, which I now did to confirm this is the package and not Atom doing it. Thanks for your assistance, I’ve started using process-palette and it seems perfect for my needs. I guess the author of atom-shell-commands will have to address this issue sooner or later on his package.