-
Notifications
You must be signed in to change notification settings - Fork 3
gstatus missing argument in timestamp calculations #14
Copy link
Copy link
Open
Description
On MacOS there seems to be a weird issue with gstatus where it prints the output fine until stashes: whereafter it complains about a missing argument which seems to have something to do with timestamp calculations.
The full output is:
math: Error: Too few arguments
'1739231450 - '
^
test: Missing argument at index 3
-gt 0
^
~/.config/fish/functions/gstatus.fish (line 275):
if test $time_since -gt $longest_time_since
^
in function 'gstatus'
~/.config/fish/functions/gstatus.fish (line 1): array indices start at 1, not 0.
math "$now - $timestamps[$i]"
^
in command substitution
called on line 273 of file ~/.config/fish/functions/gstatus.fish
in function 'gstatus'
~/.config/fish/functions/gstatus.fish (line 273): Expansion error
set -l time_since (math "$now - $timestamps[$i]")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
in function 'gstatus'
test: Missing argument at index 3
-gt 0
^
~/.config/fish/functions/gstatus.fish (line 275):
if test $time_since -gt $longest_time_since
^
in function 'gstatus'
string pad: -w: option requires an argument
[]
~/.config/fish/functions/gstatus.fish (line 1): array indices start at 1, not 0.
string pad -w $index_width $indices[$i]
^
in command substitution
called on line 285 of file ~/.config/fish/functions/gstatus.fish
in function 'gstatus'
~/.config/fish/functions/gstatus.fish (line 287): Expansion error
$cyan (string pad -w $index_width $indices[$i]) $reset \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
in function 'gstatus'
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels