default-editor

1.0.1 • Public • Published

default-editor Build Status

Get the user's default editor based on the environment variable $EDITOR

Install

$ npm install --save default-editor

Usage

The exe defined by $EDITOR is assumed to be in the $PATH

const defaultEditor = require('default-editor');

// macOS
console.log(defaultEditor);
//=> 'vim'

// Windows
console.log(defaultEditor);
//=> 'notepad.exe'

License

MIT © Sean Escriva

Credits

Directly based on https://github.com/sindresorhus/default-shell and probably less useful.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    1
  • 1.0.0
    0

Package Sidebar

Install

npm i default-editor

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • webframp