diff options
| author | Mike Vink <ivi@vinkies.net> | 2025-03-28 15:30:17 +0000 |
|---|---|---|
| committer | Mike Vink <ivi@vinkies.net> | 2025-03-28 15:30:25 +0000 |
| commit | 68f7a90a38e572c711d40a023ce47e7aee9fbd1e (patch) | |
| tree | 602161a1a554d03285746b7ba55f063e0a8174c0 | |
| parent | 54424210c9ac74f7591b5beb585181e65c9acf30 (diff) | |
use host open
| -rw-r--r-- | .config/ksh/ksh.kshrc | 2 | ||||
| -rwxr-xr-x | .local/bin/macos.d/pn | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/.config/ksh/ksh.kshrc b/.config/ksh/ksh.kshrc index ad9932d..c65df65 100644 --- a/.config/ksh/ksh.kshrc +++ b/.config/ksh/ksh.kshrc @@ -29,7 +29,7 @@ export PS1="$(hostname):\$(pwd-short)\$(prompt-git)\$(prompt-tf)\n jobs(\j) # " export HISTFILE="$HOME/.history" export HISTCONTROL=ignorespace export HISTSIZE=100000 -export FCEDIT='c s' +export FCEDIT='kak' [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc" [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutenvrc" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutenvrc" diff --git a/.local/bin/macos.d/pn b/.local/bin/macos.d/pn index 682fdcd..8bf202e 100755 --- a/.local/bin/macos.d/pn +++ b/.local/bin/macos.d/pn @@ -4,11 +4,19 @@ then eval "$SOME_VARIABLE" else echo "push.sh not installed" >&2; exit 1 fi +# Open host handler if not already exists +if ! { ps ax | grep pnsh-host-handler | grep -v grep >/dev/null 2>&1 ; } +then mkdir -p "$HOME/.cache/pnsh" + touch "$HOME/.cache/pnsh/open" + sh -c "find '$HOME/.cache/pnsh' | nohup entr -p pnsh-host-handler /_ &" >/dev/null 2>&1 +fi + # Append arguments that configure pnsh. da="--pnsh-docker-arg=" Push args \ $da--init \ $da"--env=SHELL=/usr/local/bin/oksh" \ + $da"--entrypoint=/usr/local/bin/oksh" \ $da"--env=HOME" \ $da"--volume=${HOME}:${HOME}" \ $da"--volume=${HOME}/.ssh:/root/.ssh" \ @@ -25,6 +33,10 @@ Push args \ --docker-tag=latest \ --with-docker +if [ "${1}" = "--targets" ] +then shift; eval "set -- $args $@"; exec pnsh "$@" +fi + my_name="$(basename "$0")" cmd= if [ $# -gt 0 ] |
