linux-qubasis
linux oasis port as a qubes template
git clone https://9o.is/git/linux-qubasis.git
commit d32ca68a364d91ed9af86e651b2c5a47b63acb5e parent 0c5b514afa4d33a8773bf053c80ecc76c1e93f80 Author: Jul <jul@9o.is> Date: Tue, 29 Jul 2025 02:14:10 -0400 configure vi to open directories with noice Diffstat:
| M | pkg/yash/config/00-general | | | 25 | ++++++++++++++++--------- |
1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/pkg/yash/config/00-general b/pkg/yash/config/00-general @@ -25,23 +25,30 @@ alias g='grep' alias --global L='|$PAGER' alias --global N='>/dev/null 2>&1' N1='>/dev/null' N2='2>/dev/null' +# define some basic variables +PAGER=less +EDITOR=vis +BROWSER=noice + +: ${FCEDIT:=$EDITOR} +: ${LOGNAME:=$(logname)} + +# alias-like functions cp() if [ -t 0 ]; then command cp -r "$@"; else command cp "$@"; fi rm() if [ -t 0 ]; then command rm -r "$@"; else command rm "$@"; fi df() if [ -t 0 ]; then command df -h "$@"; else command df "$@"; fi du() if [ -t 0 ]; then command du -h "$@"; else command du "$@"; fi mkdir() if [ -t 0 ]; then command mkdir -p "$@"; else command mkdir "$@"; fi -vi() { vis "$@"; } sh() { yash --posix "$@"; } yash() { command yash "$@"; } - -# define some basic variables -PAGER=less -EDITOR=vi -BROWSER=noice - -: ${FCEDIT:=$EDITOR} -: ${LOGNAME:=$(logname)} +vi() { + if [ ! "$@" ] || [ -d "$1" ]; then + command $BROWSER "$@"; + else + command $EDITOR "$@"; + fi +} # set up history HISTFILE=~/.local/state/yash/history