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

remove script references to str from

This commit is contained in:
Darren Schroeder 2021-05-27 11:26:37 -05:00
parent 0171910dfb
commit 8e8113921e
2 changed files with 3 additions and 4 deletions

View file

@ -21,11 +21,10 @@ $"($row_header)($row_data)($nl)($nl)"
# This is the meat of the script that prints the little squares of color
seq 0 6 | each { |row_idx|
let r = ($"($row_idx) * 36 + 16" | math eval)
let row_header = (echo $r | str from -d 0 | str lpad -c ' ' -l 4)
let row_header = (echo $r | into string -d 0 | str lpad -c ' ' -l 4)
let row_data = (seq 0 35 | each { |row|
let val = ($"($r + $row)" | math eval | str from -d 0)
let val = ($"($r + $row)" | math eval | into string -d 0)
$"($ansi_bg)($val)m (ansi -e 'm') "
} | str collect)
$"($row_header) ($row_data)($nl)($nl)"
} | str collect

View file

@ -46,7 +46,7 @@ def print2 [
# A print command that concatenates arguments together with an optional separator.
# This print command will also concatenate tables like [1 2 3] as well as most other primitives
# since the str from command has been updated with wider support.
# since the into string command has been updated with wider support.
def print3 [
--separator(-s):any # Optional separator (not yet flagged as optional?)
--flat(-f) # If tables are found, flatten them