From 188f9fdd1ead865b51c0b5736cd5ddfbc4831f27 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Mon, 28 Mar 2022 19:53:05 +0300 Subject: [PATCH] Nicer and simpler dc invocation --- bin/bin/zc | 14 -------------- dc/.dc | 8 ++++++++ dc/bin/zc | 7 +++++++ 3 files changed, 15 insertions(+), 14 deletions(-) delete mode 100755 bin/bin/zc create mode 100644 dc/.dc create mode 100755 dc/bin/zc diff --git a/bin/bin/zc b/bin/bin/zc deleted file mode 100755 index 74d4af7..0000000 --- a/bin/bin/zc +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -# natural logarithm: 1000lLx 10lLx /p -# sum of everything in stack: lSxp -pre="5k 10o \ -[1-d2+/d2*Skd*Sy0Ss10K^Sp[d1r/lk*ls+lsrdss-lp*d*1[s_q]s_>_lkly*sk2+lfx]Sf1lfxLsLkLyLpLfs_s_s_s_]sL \ -[0d[+2z>a]salax]sS -" -exec rlwrap \ - --history-filename /tmp/.dc_history \ - --substitute-prompt "> " \ - --prompt-colour=red \ - --wait-before-prompt -1 \ - --pre-given "$pre" dc diff --git a/dc/.dc b/dc/.dc new file mode 100644 index 0000000..1061117 --- /dev/null +++ b/dc/.dc @@ -0,0 +1,8 @@ +5k +10o + +# natural logarithm: 1000lLx 10lLx /p +[1-d2+/d2*Skd*Sy0Ss10K^Sp[d1r/lk*ls+lsrdss-lp*d*1[s_q]s_>_lkly*sk2+lfx]Sf1lfxLsLkLyLpLfs_s_s_s_]sL + +# sum of everything in stack: lSxp +[0d[+2z>a]salax]sS diff --git a/dc/bin/zc b/dc/bin/zc new file mode 100755 index 0000000..4998a56 --- /dev/null +++ b/dc/bin/zc @@ -0,0 +1,7 @@ +#!/bin/sh + +exec rlwrap \ + --history-filename /tmp/.dc_history \ + --substitute-prompt "> " \ + --prompt-colour=red \ + dc -f ~/.dc -f /dev/stdin -- 2.44.0