linux-open

Linux alternative for OS X's `open` command

Usage no npm install needed!

<script type="module">
  import linuxOpen from 'https://cdn.skypack.dev/linux-open';
</script>

README

Linux Open - OS X open alternative

A simple app to associate file extensions with applications via simple config file

Install

Install via npm install -g linux-open

Usage

Run open file to open in default application

Configuration

The app looks for a ~/.open file. With the following format:

{
    "app command": ["extension1", "extension2"]
}

Here is an example:

{
    "subl":["txt", "js"],
    "tar":["tar.gz"],
    "gzip":["gz"]
}

Files without association or extension will be opened by an app with !generic, e.g.

{
    "subl": ["txt", "js", "!generic"]
}

Directories will be opened by apps with the !directory association.