From 6e96b514dec29b438ac0b17a6bf81f7c179d7073 Mon Sep 17 00:00:00 2001 From: Mike Vink <59492084+ivi-vink@users.noreply.github.com> Date: Wed, 29 Jan 2025 12:41:42 +0000 Subject: add mut updates --- mut/bin/pnsh-nvim | 5 +++-- mut/bin/xdg-open | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'mut/bin') diff --git a/mut/bin/pnsh-nvim b/mut/bin/pnsh-nvim index f23fd6f..833a67d 100755 --- a/mut/bin/pnsh-nvim +++ b/mut/bin/pnsh-nvim @@ -10,6 +10,7 @@ let args = ( " --entrypoint=/usr/bin/nu" + " --env=TERM=xterm" + $" --env=TERMINFO" + +$" --env=EDITOR=vis" + $" --volume=($env.TERMINFO):($env.TERMINFO)" + " --env=_ZO_DATA_DIR=/hostfs/.local/share/zoxide" + " --volume=/etc/profiles/per-user/ivi/etc/profile.d:/etc/profiles/per-user/ivi/etc/profile.d" + @@ -36,6 +37,6 @@ $" --volume=($env | default "/var/run" XDG_RUNTIME_DIR | get XDG_RUNTIME_DIR)/do --pnsh-host-bindfs-disabled --pnsh-docker-extra-args=$"($args)" --with-docker - --docker-image=pionativedev.azurecr.io/pionative/pnsh-nvim - --docker-tag=darwin + --docker-image=pionativedev.azurecr.io/pionative/pnsh-vis + --docker-tag=latest ) diff --git a/mut/bin/xdg-open b/mut/bin/xdg-open index ca18836..f401d16 100755 --- a/mut/bin/xdg-open +++ b/mut/bin/xdg-open @@ -1,2 +1,5 @@ #!/bin/bash -nu --commands "^echo $1 | nc 127.0.0.1 1994 | echo" +case "$(file --mime-type $1 | awk '{print $2}')" in + text/*|application/json) exec "$EDITOR" $1 ;; + *) nu --commands "^echo $1 | nc 127.0.0.1 1994 | echo" ;; +esac -- cgit v1.2.3