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
| Flag | Type | Description |
|---|---|---|
-app |
string |
Force app id instead of extension-based matching |
Exit Codes
| Code | Meaning |
|---|---|
0 |
Success |
1 |
Runtime/command error |
2 |
Invalid flags/usage |