mirror of
https://github.com/nushell/nu_scripts.git
synced 2024-08-16 17:00:32 +03:00
updated some scripts to support the latest changes in 0.77.1 (#416)
This commit is contained in:
parent
2024d52938
commit
00b0039653
@ -15,7 +15,7 @@ seq 0 $height | each { |row|
|
||||
$"(ansi -e '48;2;0;0;')($fgcolor)m(char sp)(ansi -e '0m')"
|
||||
}
|
||||
} | str collect)
|
||||
$"($row_data)(char newline)"
|
||||
print -n $"($row_data)(char newline)"
|
||||
} | str collect
|
||||
|
||||
def iter_inc [incr mult iter] {
|
||||
|
@ -3,13 +3,8 @@ def turtle [column: string] {
|
||||
wrap $column | table
|
||||
}
|
||||
|
||||
print -n "Turtle 1 = "
|
||||
"turtle" | turtle 1 | str length
|
||||
print -n "Turtle 2 = "
|
||||
"turtle" | turtle 1 | turtle 2 | str length
|
||||
print -n "Turtle 3 = "
|
||||
"turtle" | turtle 1 | turtle 2 | turtle 3 | str length
|
||||
print -n "Turtle 4 = "
|
||||
"turtle" | turtle 1 | turtle 2 | turtle 3 | turtle 4 | str length
|
||||
print -n "Turtle 5 = "
|
||||
"turtle" | turtle 1 | turtle 2 | turtle 3 | turtle 4 | turtle 5 | str length
|
||||
print $"Turtle 1 = ('turtle' | turtle 1 | str length)"
|
||||
print $"Turtle 2 = ('turtle' | turtle 1 | turtle 2 | str length)"
|
||||
print $"Turtle 3 = ('turtle' | turtle 1 | turtle 2 | turtle 3 | str length)"
|
||||
print $"Turtle 4 = ('turtle' | turtle 1 | turtle 2 | turtle 3 | turtle 4 | str length)"
|
||||
print $"Turtle 5 = ('turtle' | turtle 1 | turtle 2 | turtle 3 | turtle 4 | turtle 5 | str length)"
|
@ -62,8 +62,8 @@ def print_blocks [start:int, end:int, block_cols:int, block_rows:int, blocks_per
|
||||
} | str collect
|
||||
}
|
||||
|
||||
print_run 0 16 # The first 16 colours are spread over the whole spectrum
|
||||
print (print_run 0 16) # The first 16 colours are spread over the whole spectrum
|
||||
print "" # Single line
|
||||
print_blocks 16 123 6 6 3 # 6x6x6 colour cube between 16 and 123 inclusive
|
||||
print_blocks 124 231 6 6 3 # 6x6x6 colour cube between 124 and 231 inclusive
|
||||
print_blocks 232 255 12 2 1 # Not 50, but 24 Shades of Grey
|
||||
print (print_blocks 16 123 6 6 3) # 6x6x6 colour cube between 16 and 123 inclusive
|
||||
print (print_blocks 124 231 6 6 3) # 6x6x6 colour cube between 124 and 231 inclusive
|
||||
print (print_blocks 232 255 12 2 1) # Not 50, but 24 Shades of Grey
|
Loading…
Reference in New Issue
Block a user