scripts

Various scripts for UNIX-like systems
git clone https://git.tronto.net/scripts
Download | Log | Files | Refs | README

commit c753cb09fa29b86664f7e61c6cace60db57aa002
parent cef87ace700f2865032eafb2c82dbb5700d1e518
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date:   Mon, 25 Mar 2024 09:27:35 +0100

Changes to alg

Diffstat:
Malg | 11+++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/alg b/alg @@ -6,10 +6,10 @@ # Example: alg c UBL E - prints out all first algs for UBL-FDR-* usage() { - echo "Usage: alg [c|e|w] [buffer] [1 letter|2 letters]" + echo "Usage: alg [edit] (c|e|w) [buffer] (1 letter|2 letters)" } -editor=vi +default_editor=vi basedir="$HOME/box/speedcubing/bld/algs" ebuffer=UR cbuffer=UFR @@ -137,6 +137,13 @@ showall_w() { done } +if [ "$1" = "edit" ]; then + editor="$default_editor" + shift +else + editor="cat" +fi + type="$1" if [ -z "$3" ]; then letters="$2"