From c37700972f561f7686ac07235fa698ebaf5a9c6f Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Thu, 1 Oct 2020 00:52:29 +0300 Subject: [PATCH] No permanent dc history --- bin/bin/dc-wrapped.sh | 3 +++ bin/bin/tmux-menu-calc.sh | 2 +- zsh/.zshrc | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100755 bin/bin/dc-wrapped.sh diff --git a/bin/bin/dc-wrapped.sh b/bin/bin/dc-wrapped.sh new file mode 100755 index 0000000..11fdd21 --- /dev/null +++ b/bin/bin/dc-wrapped.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +exec rlwrap --history-filename /tmp/.dc_history --substitute-prompt "> " dc diff --git a/bin/bin/tmux-menu-calc.sh b/bin/bin/tmux-menu-calc.sh index 1d0e6b1..6710019 100755 --- a/bin/bin/tmux-menu-calc.sh +++ b/bin/bin/tmux-menu-calc.sh @@ -1,7 +1,7 @@ #!/bin/sh tmux has-session -t calc || { - tmux new-session -d -s calc rlwrap -S "> " dc + tmux new-session -d -s calc ~/bin/dc-wrapped.sh tmux set-option -t calc status off } exec tmux attach-session -t calc diff --git a/zsh/.zshrc b/zsh/.zshrc index c75045f..0210c72 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -83,7 +83,7 @@ alias -g M="| less" alias -g W="| wc -l" alias mc="mc --nomouse" alias sent="mutt -f =sent-\`date '+%y-%m'\`" -alias zc="rlwrap -S '> ' dc" +alias zc=~/bin/dc-wrapped.sh f() { # find . -name "*$1*" -print -- 2.44.0