From 4ef23e4cc1433ed196bb04841f78f148f1969080 Mon Sep 17 00:00:00 2001 From: LordMZTE Date: Tue, 14 Nov 2023 19:25:42 +0100 Subject: [PATCH] rash: show last command time in prompt --- .config/rash/rashrc.rkt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.config/rash/rashrc.rkt b/.config/rash/rashrc.rkt index 33b9427..92981b4 100644 --- a/.config/rash/rashrc.rkt +++ b/.config/rash/rashrc.rkt @@ -7,14 +7,15 @@ (provide nv) (current-prompt-function - (λ (#:last-return-value retval) + (λ (#:last-return-value retval + #:last-command-duration duration) (unless (void? retval) (display ((current-rash-top-level-print-formatter) retval))) (parameterize ([current-environment-variables (environment-variables-copy (current-environment-variables))]) (putenv "MZPROMPT_STATUS" (if (exn:fail? retval) "1" "0")) (putenv "MZPROMPT_FISH_MODE" "insert") - (putenv "MZPROMPT_DURATION" "0") + (putenv "MZPROMPT_DURATION" (number->string duration)) (putenv "MZPROMPT_JOBS" "0") (readline-prompt #{prompt show |> port->bytes}))))