You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
I have a small list of atom packages I want to install into any of my current and future atom installations.
It is possible to install it through apm install --packages-file packages-file.txt.
However, this requires me to remember the command or take the time to look up the correct arguments.
Instead, I would like to create an executable that runs command.
One simple way would be to create a shell script like this (not tested):
This currently does not work because apm treats every line in a packages file as a package.
Implementation ideas
Idea 1: Allow comments.
I couldn’t find documentation on package naming rules with a quick search, but I doubt that package names with # symbols are possible.
If so, this symbol could be treated as the beginning of a comment, regardless of whether it starts a line or is placed after a package name.
An implementation of this could be done by changing a single line (+ tests).
Then the following file
#!/some/shebang
package1
package2 # This is a comment.# This is also a comment.
package3
would be interpreted by apm install --packages-file as
package1
package2
package3
Idea 2: Only ignore a shebang line.
Alternatively, if for whatever reason the above approach is not possible/desired, the first line of a packages file could be ignored, if it looks like a shebang (i.e. starts with #!).
I would prefer having comment support and would be able to create a pull request for this.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Motivation
I have a small list of atom packages I want to install into any of my current and future atom installations.
It is possible to install it through
apm install --packages-file packages-file.txt
.However, this requires me to remember the command or take the time to look up the correct arguments.
Instead, I would like to create an executable that runs command.
One simple way would be to create a shell script like this (not tested):
However, it might be done even simpler with an executable file with the following content.
#!/usr/bin/env -S apm install --packages-file package1 package2
This currently does not work because apm treats every line in a packages file as a package.
Implementation ideas
Idea 1: Allow comments.
I couldn’t find documentation on package naming rules with a quick search, but I doubt that package names with
#
symbols are possible.If so, this symbol could be treated as the beginning of a comment, regardless of whether it starts a line or is placed after a package name.
An implementation of this could be done by changing a single line (+ tests).
Then the following file
would be interpreted by
apm install --packages-file
asIdea 2: Only ignore a shebang line.
Alternatively, if for whatever reason the above approach is not possible/desired, the first line of a packages file could be ignored, if it looks like a shebang (i.e. starts with
#!
).I would prefer having comment support and would be able to create a pull request for this.
The text was updated successfully, but these errors were encountered: