]> Sergey Matveev's repositories - dotfiles.git/commitdiff
Prefill dc's registers
authorSergey Matveev <stargrave@stargrave.org>
Wed, 14 Oct 2020 20:33:14 +0000 (23:33 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Wed, 14 Oct 2020 20:33:14 +0000 (23:33 +0300)
bin/bin/dc-wrapped.sh

index 11fdd21fa640126f8509bef2a4701442105f7b13..64211fce9d0551cbf2622f4520ba88df51907d6b 100755 (executable)
@@ -1,3 +1,11 @@
 #!/bin/sh
 
 #!/bin/sh
 
-exec rlwrap --history-filename /tmp/.dc_history --substitute-prompt "> " dc
+# 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
+"
+
+sleep 0.01 # do not know why, but only with it it works in tmux menu
+exec rlwrap --history-filename /tmp/.dc_history --substitute-prompt "> " --pre-given "$pre" dc