commit 9500f9dbb09ec8b7c02aac7987ad72eef79fc417 parent 9efc495c8aab5a6bf21163938139cb079620532c Author: mpizzzle <m@michaelpercival.xyz> Date: Sat, 18 Jul 2020 15:46:09 +0100 small command I find repeating to fzf through my zhist Diffstat:
| A | .local/bin/cphist.sh | | | 3 | +++ |
| M | .local/bin/dictionary.sh | | | 2 | +- |
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/.local/bin/cphist.sh b/.local/bin/cphist.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +grep "$1" $ZHIST | fzf | clip diff --git a/.local/bin/dictionary.sh b/.local/bin/dictionary.sh @@ -68,7 +68,7 @@ while true; do if [ "$var" == "$user_input" ]; then successes=$((successes + 1)) - fib=$(bc -l <<< "(((sqrt(5) + 1) / 2) ^ ($successes + 1) - (-((sqrt(5) + 1) / 2)) ^ -($successes + 1)) / sqrt(5)" | awk '{printf("%dn", $1 + 0.5)}') + fib=$(bc -l <<< "(((sqrt(5) + 1) / 2) ^ ($successes + 1) - (-((sqrt(5) + 1) / 2)) ^ -($successes + 1)) / sqrt(5)" | awk '{printf("%dn", ($1 + 0.5) * 5)}') echo "correct! will ask you again in $fib minutes." future_date=$(date --iso-8601=seconds -d "+$fib minutes")