From 4c2194a7c5758637259d109df248c24a2fac62e6 Mon Sep 17 00:00:00 2001 From: davidovski Date: Sun, 12 Nov 2023 23:08:36 +0000 Subject: Use mksh history --- mkshrc | 3 +++ scripts/websearch | 2 ++ 2 files changed, 5 insertions(+) diff --git a/mkshrc b/mkshrc index 641c376..fbaf10b 100644 --- a/mkshrc +++ b/mkshrc @@ -7,6 +7,9 @@ esac export VIMINIT="source ~/.config/vim/vimrc" export NVIMINIT="source ~/.config/vim/vimrc" +HISTFILE="$HOME/.mksh_history" +HISTSIZE=5000 + if [ -x /usr/bin/dircolors ]; then test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" alias ls='ls --color=auto' diff --git a/scripts/websearch b/scripts/websearch index 5ffb91b..7af5b57 100755 --- a/scripts/websearch +++ b/scripts/websearch @@ -7,6 +7,8 @@ SEARCH_HISTORY=$HOME/.local/share/search_history SEARCH=$(cat $SEARCH_HISTORY | dmenu -p "search") +[ -z "$SEARCH" ] && exit 1 + echo "$SEARCH" >> $SEARCH_HISTORY query=$(echo $SEARCH | sed 's/ /+/g') -- cgit v1.2.1