diff options
| -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 ] |
