mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-02 07:07:46 +00:00
parent
d21cdfc0a5
commit
3b89c26a3f
1 changed files with 1 additions and 10 deletions
|
@ -1,15 +1,6 @@
|
||||||
def up_inner [limit: int] {
|
|
||||||
mut x = []
|
|
||||||
for $e in 0..$limit { $x = $x ++ "." }
|
|
||||||
$x | str collect
|
|
||||||
}
|
|
||||||
|
|
||||||
# Go up a number of directories
|
# Go up a number of directories
|
||||||
def-env up [
|
def-env up [
|
||||||
limit = 1: int # The number of directories to go up (default is 1)
|
limit = 1: int # The number of directories to go up (default is 1)
|
||||||
] {
|
] {
|
||||||
cd (
|
cd ("." * ($limit + 1))
|
||||||
(up_inner $limit)
|
|
||||||
| into string
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue