nu: rewatch - fully swallow interrupt in catch
This commit is contained in:
@@ -24,9 +24,7 @@ def rewatch [interval: duration, cmd: closure] {
|
||||
do $cmd | print
|
||||
sleep $interval
|
||||
}
|
||||
} catch {|e|
|
||||
if ($e.msg !~ "interrupted") { error make { msg: $e.msg } }
|
||||
}
|
||||
} catch { null }
|
||||
}
|
||||
|
||||
# Environment variables as a filterable sorted table
|
||||
|
||||
Reference in New Issue
Block a user