open

cmd/open

Open files or directories with associated apps

Overview

open launches a file or directory using app associations.

How it works:

  • Files are opened by extension-to-app mapping.
  • Directories open in File Manager.
  • You can force a specific app with --app=<id>.

Example usage:

open ./notes.txt
open ./photos/cat.png
open ./projects --app=dev.avyos.filemanager

Usage

  • open <path> [--app=<id>]

Flags

FlagTypeDescription
-app string Force app id instead of extension-based matching

Exit Codes

CodeMeaning
0 Success
1 Runtime/command error
2 Invalid flags/usage