Security News
OpenJS: “XZ Utils Cyberattack Likely Not an Isolated Incident”
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.
shelljs-plugin-open
Advanced tools
Weekly downloads
Readme
A ShellJS plugin for the open()
command
to open a file (or URL) with its default application. This is largely based on
opener.
This is designed to imitate the open
command on Mac OS X. Here's the
equivalent commands for other systems:
Mac OS X
$ open file.txt # opens in a text editor
Linux
$ xdg-open file.txt # opens in a text editor
Windows
> start file.txt
$ npm install --save shelljs
$ npm install --save shelljs-plugin-open
ShellJS unofficially has the capacity for plugins (the API is likely to change a bit) since v0.7.1. Although we don't recommend developing for this yet, this plugin is designed to test that API, and we will adapt it along with changes to ShellJS up until official plugin support. To use this plugin, you must use exactly version v0.7.1 (although, eventually this will support v1.0.0+).
To use this plugin in your project, include it like so:
var shell = require('shelljs');
require('shelljs-plugin-open');
// Ex. usage:
shell.open('file.txt'); // the plugin is now available!
This is supported for Node v0.11+
If you're interested in taking a look at the current state of the plugin API, take a look at index.js. This has helpful comments explaining the necessary boilerplate for writing a plugin. For an example usage of the plugin, take a look at test/test.js.
FAQs
An example shelljs-plugin to open a file with its default application
The npm package shelljs-plugin-open receives a total of 938 weekly downloads. As such, shelljs-plugin-open popularity was classified as not popular.
We found that shelljs-plugin-open demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.
Company News
Come meet the Socket team at BSidesSF and RSA! We're sponsoring several fun networking events and we would love to see you there.
Security News
OSI is starting a conversation aimed at removing the excuse of the SaaS loophole for companies navigating licensing and the complexities of doing business with open source.