Compare commits

...

3 Commits

Author SHA1 Message Date
Connor Olding 90038bf996 allow numbers to end with a comma in the sum command
makes it easier to paste stuff into the terminal
2022-03-05 17:41:17 -08:00
Connor Olding 7d895d20a7 work around a really obtuse zsh quirk with numeric types
i should do this for the rest of the loops in the other files too.
2022-03-05 17:39:44 -08:00
Connor Olding 9116e418cf make F8 reload the current file instead of whatever 2022-03-05 17:39:11 -08:00
3 changed files with 4 additions and 3 deletions

View File

@ -286,11 +286,11 @@ com! -nargs=+ Inn call Inn(<q-args>)
Inn <F5> :w<cr>
Inn <F6> :Next<cr>
Inn <F7> :next<cr>
Inn <F8> :e<cr>
Inn <F8> :e %<cr>
Inn <F9> @@
Inn <F10> :bd<cr>
Inn <c-F5> :w!<cr>
Inn <c-F8> :e!<cr>
Inn <c-F8> :e! %<cr>
Inn <c-F10> :bd!<cr>
Inn <s-F5> :wall<cr>

View File

@ -88,7 +88,7 @@ mpv_watch() { ### @-
pushd ~/play >/dev/null
local url="$1"; shift
local seen=0 A=()
local seen=0 A=() a= # need to make loop vars local thanks to numeric types in zsh
# for a; do [ "$a" = "${a#--ytdl-format}" ] && A+=("$a") || seen=1; done
for a; do A+=("$a"); done # bypass ytdl-format checks
[ $seen = 0 ] || printf '%s\n' "NOTE: the --ytdl-format flag is temporarily ignored due to throttling issues." >&2

1
sh/sum
View File

@ -16,6 +16,7 @@ sum() { ### @-
### **TODO:** consider renaming because sum(1) already exists.
local sum=0
for i; do
i="${i%,}"
: $((sum+=i))
done
echo "$sum"