mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-08 17:02:17 +00:00
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]>
14 lines
418 B
Bash
Executable File
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 "$@"
|