Default tmcodex to unix remote
This commit is contained in:
@@ -24,6 +24,19 @@ function _tmcodex_resolve_dir {
|
|||||||
cd -- "$dir" && pwd -P
|
cd -- "$dir" && pwd -P
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function _tmcodex_has_remote_arg {
|
||||||
|
while [ "$#" -gt 0 ]; do
|
||||||
|
case "$1" in
|
||||||
|
--remote|--remote=*)
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
function tmcodex {
|
function tmcodex {
|
||||||
launch_dir="$PWD"
|
launch_dir="$PWD"
|
||||||
|
|
||||||
@@ -69,7 +82,11 @@ function tmcodex {
|
|||||||
|
|
||||||
(
|
(
|
||||||
cd -- "$launch_dir" || exit
|
cd -- "$launch_dir" || exit
|
||||||
|
if _tmcodex_has_remote_arg "$@"; then
|
||||||
trw codex --dangerously-bypass-approvals-and-sandbox --cd "$launch_dir" "$@"
|
trw codex --dangerously-bypass-approvals-and-sandbox --cd "$launch_dir" "$@"
|
||||||
|
else
|
||||||
|
trw codex --remote "${TMCODEX_REMOTE:-unix://}" --dangerously-bypass-approvals-and-sandbox --cd "$launch_dir" "$@"
|
||||||
|
fi
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user