Files
openidea/src-tauri/cli/openidea
T
jawandClaude Opus 5.5 be0a6b4359 feat(app): an openidea shell command that opens files and folders in the running app (macOS)
The bundle ships Contents/Resources/bin/openidea, a script that runs the app
executable in CLI mode. It sends its targets (--line/--column, or
path:line:column) to the running app over a per-identifier Unix socket, or
starts the app and waits for it. Install/Uninstall 'openidea' Command in the
app menu links it onto PATH.

Restoring a project's editor session no longer counts as the user picking a
tab, so a file opened with the project keeps its caret and activation.

Closes #1286

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-07 21:57:29 +08:00

14 lines
418 B
Bash
Executable File

#!/bin/sh
# The `openidea` command, linked onto PATH by "Install 'openidea' Command".
# Runs the app executable of this bundle in CLI mode (src-tauri/src/cli.rs).
self=$0
while [ -L "$self" ]; do
link=$(readlink "$self")
case $link in
/*) self=$link ;;
*) self=$(dirname "$self")/$link ;;
esac
done
contents=$(cd "$(dirname "$self")/../.." && pwd -P) || exit 1
exec "$contents/MacOS/openidea" --cli "$@"