mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-01 22:57: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
|
||||
def-env up [
|
||||
limit = 1: int # The number of directories to go up (default is 1)
|
||||
] {
|
||||
cd (
|
||||
(up_inner $limit)
|
||||
| into string
|
||||
)
|
||||
cd ("." * ($limit + 1))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue