# Copyright (c) 2025 Termius Corporation.

abi <abi/__ABI__>,
include <tunables/global>

profile "__PATH__" flags=(complain) {
  # Include console/TTY/PTY abstractions to preserve terminal output display
  # Without this, some child commands can execute
  # successfully but the output might not appear in the terminal.
  include <abstractions/consoles>

  # Allow Termius to run additional processes of itself with inherited profile
  "__PATH__" ix,

  # Allow common shells to be launched using their profile if available, otherwise execute unconfined
  /usr/bin/bash pux,
  /bin/bash pux,
  /usr/bin/sh pux,
  /bin/sh pux,
  /usr/bin/dash pux,
  /bin/dash pux,
  /usr/bin/zsh pux,
  /bin/zsh pux,
  /usr/bin/fish pux,
  /usr/bin/ksh pux,
  /bin/ksh pux,
  /usr/bin/tcsh pux,
  /bin/tcsh pux,
  /usr/bin/csh pux,
  /bin/csh pux,
  /usr/bin/nu pux,

__USERNS__
}

include if exists <local/termius>
