diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2024-03-25 09:27:35 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2024-03-25 09:27:35 +0100 |
| commit | c753cb09fa29b86664f7e61c6cace60db57aa002 (patch) | |
| tree | 7ee938166d3d380e492492415cf05a29606198f5 | |
| parent | cef87ace700f2865032eafb2c82dbb5700d1e518 (diff) | |
| download | scripts-c753cb09fa29b86664f7e61c6cace60db57aa002.tar.gz scripts-c753cb09fa29b86664f7e61c6cace60db57aa002.zip | |
Changes to alg
Diffstat (limited to '')
| -rwxr-xr-x | alg | 11 |
1 files changed, 9 insertions, 2 deletions
| @@ -6,10 +6,10 @@ | |||
| 6 | # Example: alg c UBL E - prints out all first algs for UBL-FDR-* | 6 | # Example: alg c UBL E - prints out all first algs for UBL-FDR-* |
| 7 | 7 | ||
| 8 | usage() { | 8 | usage() { |
| 9 | echo "Usage: alg [c|e|w] [buffer] [1 letter|2 letters]" | 9 | echo "Usage: alg [edit] (c|e|w) [buffer] (1 letter|2 letters)" |
| 10 | } | 10 | } |
| 11 | 11 | ||
| 12 | editor=vi | 12 | default_editor=vi |
| 13 | basedir="$HOME/box/speedcubing/bld/algs" | 13 | basedir="$HOME/box/speedcubing/bld/algs" |
| 14 | ebuffer=UR | 14 | ebuffer=UR |
| 15 | cbuffer=UFR | 15 | cbuffer=UFR |
| @@ -137,6 +137,13 @@ showall_w() { | |||
| 137 | done | 137 | done |
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | if [ "$1" = "edit" ]; then | ||
| 141 | editor="$default_editor" | ||
| 142 | shift | ||
| 143 | else | ||
| 144 | editor="cat" | ||
| 145 | fi | ||
| 146 | |||
| 140 | type="$1" | 147 | type="$1" |
| 141 | if [ -z "$3" ]; then | 148 | if [ -z "$3" ]; then |
| 142 | letters="$2" | 149 | letters="$2" |
