1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-08-02 07:07:46 +00:00

update script syntax to match the latest nushell (#429)

This commit is contained in:
Darren Schroeder 2023-03-31 07:39:20 -05:00 committed by GitHub
parent a0c1314dd0
commit 4f2263447f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 31 additions and 29 deletions

View file

@ -4,9 +4,9 @@
let height = (term size).rows - 3 # calculate height
let width = (term size).columns - 5 # calculate width
let stamp_start = $width * 1.25 # calculate where to start Nu stamp
let stamp_end = $width * 1.3125 # calculate where to stop Nu stamp
let stamp_end = $width * 1.3 # calculate where to stop Nu stamp
let stamp = 'Nu'
seq 0 $height | par-each { # create these in parallel
seq 0 $height | par-each {|| # create these in parallel
let row_data = (seq 0 $width | each { |col|
let fgcolor = 2 + 2 * $col
if $fgcolor > $stamp_start and $fgcolor < $stamp_end {
@ -15,6 +15,6 @@ seq 0 $height | par-each { # create these in parallel
$"(ansi -e '48;2;0;0;')($fgcolor)m (ansi -e '0m')"
}
} | str collect)
$"($row_data)" | table
print -n $"($row_data)" | table
$nothing
} | compact