mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-31 12:21:19 -03:00
tests: fix date --version printing junk, update interactive.fish
This commit is contained in:
@@ -136,7 +136,7 @@ end
|
||||
|
||||
# lame timer
|
||||
for program in {g,}date
|
||||
if $program --version
|
||||
if $program --version 1>/dev/null 2>/dev/null
|
||||
set milli $program
|
||||
set unit ms
|
||||
break
|
||||
@@ -145,13 +145,13 @@ for program in {g,}date
|
||||
end
|
||||
end
|
||||
|
||||
function timestamp -V milli
|
||||
function timestamp
|
||||
set -q milli[1]
|
||||
and $milli +%s%3N
|
||||
or date +%s
|
||||
end
|
||||
|
||||
function delta -V milli
|
||||
function delta
|
||||
set -q milli[1]
|
||||
and math "( "($milli +%s%3N)" - $argv[1])"
|
||||
or math (date +%s) - $starttime
|
||||
|
||||
Reference in New Issue
Block a user