mirror of
https://github.com/nushell/nu_scripts.git
synced 2024-10-26 13:55:28 +03:00
use repeat
instead of string multiplication (#612)
This commit is contained in:
parent
36a45f28a3
commit
79fcd05525
@ -1,6 +1,8 @@
|
||||
use std repeat;
|
||||
|
||||
# Go up a number of directories
|
||||
def-env up [
|
||||
limit = 1: int # The number of directories to go up (default is 1)
|
||||
] {
|
||||
cd ("." * ($limit + 1))
|
||||
cd ("." | repeat ($limit + 1) | str join)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user