Skip to content

Commit 9f151f0

Browse files
committed
Use shfmt
1 parent d7368a8 commit 9f151f0

File tree

2 files changed

+57
-57
lines changed

2 files changed

+57
-57
lines changed

bin/SPC

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -193,61 +193,61 @@ function SPC {
193193
break
194194
fi
195195
case "$1" in
196-
"-h" | "--help") # print usage and exit
197-
usage
198-
return 0
199-
;;
200-
201-
"--dry-run") # print emacsclient command
202-
DRYRUN=1
203-
;;
204-
205-
"-D" | "--describe")
206-
WRAPPER="$W_DESCRIBE"
207-
MACRO_CALL="(SPC_KEYS)"
208-
;;
209-
210-
"-M" | "--macro-caller") # Use next argument as code wrapper.
211-
shift
212-
MACRO_CALL="$1"
213-
;;
214-
215-
"-W" | "--wrapper") # Use next argument as code wrapper.
216-
shift
217-
WRAPPER="$1"
218-
;;
219-
220-
"-WPRINT")
221-
WRAPPER="$W_PRINTBUF"
222-
;;
223-
224-
"-L" | "--leader") # Use next argument as leader.
225-
shift
226-
LEADER="$1"
227-
;;
228-
229-
"-l" | "--lisp") # Use next argument literally.
230-
shift
231-
KEYS+=("$1")
232-
;;
233-
234-
"-r" | "--raw") # Use next argument raw.
235-
shift
236-
KEYS+=("$(echo -n "$1" | vquote64)")
237-
;;
238-
239-
"-f-" | "--stdin") # Read raw content from STDIN
240-
KEYS+=("$(vquote64)")
241-
;;
242-
243-
"-f" | "--file-raw") # Read raw content from FILE
244-
shift
245-
KEYS+=("$(vquote64 <"$1")")
246-
;;
247-
248-
*)
249-
KEYS+=("$(echo -n "$1" | vqKbd64)")
250-
;;
196+
"-h" | "--help") # print usage and exit
197+
usage
198+
return 0
199+
;;
200+
201+
"--dry-run") # print emacsclient command
202+
DRYRUN=1
203+
;;
204+
205+
"-D" | "--describe")
206+
WRAPPER="$W_DESCRIBE"
207+
MACRO_CALL="(SPC_KEYS)"
208+
;;
209+
210+
"-M" | "--macro-caller") # Use next argument as code wrapper.
211+
shift
212+
MACRO_CALL="$1"
213+
;;
214+
215+
"-W" | "--wrapper") # Use next argument as code wrapper.
216+
shift
217+
WRAPPER="$1"
218+
;;
219+
220+
"-WPRINT")
221+
WRAPPER="$W_PRINTBUF"
222+
;;
223+
224+
"-L" | "--leader") # Use next argument as leader.
225+
shift
226+
LEADER="$1"
227+
;;
228+
229+
"-l" | "--lisp") # Use next argument literally.
230+
shift
231+
KEYS+=("$1")
232+
;;
233+
234+
"-r" | "--raw") # Use next argument raw.
235+
shift
236+
KEYS+=("$(echo -n "$1" | vquote64)")
237+
;;
238+
239+
"-f-" | "--stdin") # Read raw content from STDIN
240+
KEYS+=("$(vquote64)")
241+
;;
242+
243+
"-f" | "--file-raw") # Read raw content from FILE
244+
shift
245+
KEYS+=("$(vquote64 <"$1")")
246+
;;
247+
248+
*)
249+
KEYS+=("$(echo -n "$1" | vqKbd64)")
250+
;;
251251
esac
252252
shift
253253
done

treefmt.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"bin/SPC"
99
];
1010
programs.shellcheck.excludes = [ ".envrc" ];
11-
programs.beautysh.enable = true;
12-
programs.beautysh.includes = [
11+
programs.shfmt.enable = true;
12+
programs.shfmt.includes = [
1313
"*.bats"
1414
"bin/SPC"
1515
];

0 commit comments

Comments
 (0)