From: Sergey Matveev Date: Mon, 28 Mar 2022 16:53:05 +0000 (+0300) Subject: Nicer and simpler dc invocation X-Git-Url: http://www.git.stargrave.org/?p=dotfiles.git;a=commitdiff_plain;h=188f9fdd1ead865b51c0b5736cd5ddfbc4831f27 Nicer and simpler dc invocation --- 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