From 24a3786210251aed4e5b83ea154d44e34c5b8861 Mon Sep 17 00:00:00 2001 From: surdeus Date: Sat, 27 Jul 2024 19:38:29 +0500 Subject: [PATCH] bash: use vi mode. --- dot/file/bashrc | 1 + lf/previewer | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dot/file/bashrc b/dot/file/bashrc index 6d60666..ddaeb32 100644 --- a/dot/file/bashrc +++ b/dot/file/bashrc @@ -1,6 +1,7 @@ . $HOME/.shrc export PS1='; ' +set -o vi test -r "$LOGIN" && . "$LOGIN" test -r "$SETENV" && . "$SETENV" && setenv bash diff --git a/lf/previewer b/lf/previewer index 496ac3e..06e72f2 100755 --- a/lf/previewer +++ b/lf/previewer @@ -1,7 +1,9 @@ #!/bin/sh draw() { - kitten icat --silent --stdin no --transfer-mode memory --place "${w}x${h}@${x}x${y}" "$1" /dev/tty - exit 1 + if which kitten > /dev/null ; then + kitten icat --silent --stdin no --transfer-mode memory --place "${w}x${h}@${x}x${y}" "$1" /dev/tty + exit 1 + fi } file="$1"