nu: fix rewatch - pipe closure output through print
This commit is contained in:
@@ -19,8 +19,8 @@ def rewatch [interval: duration, cmd: closure] {
|
||||
loop {
|
||||
clear
|
||||
let dim = $env.config.color_config.hints
|
||||
print $"(ansi --escape $dim)(date now | format date '%H:%M:%S')(ansi reset)"
|
||||
do $cmd
|
||||
print $"(ansi { fg: $dim })(date now | format date '%H:%M:%S')(ansi reset)"
|
||||
do $cmd | print
|
||||
sleep $interval
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user