Re:Linux Terminal Goods
by imglorp on Thursday September 19, 2019 @10:17AM
(#21016381)
Hey guys, I have the same thing, but I called the command ".." (no it doesn't conflict with the directory). ".." by itself is the same as ".. 3"
[ Parent
| on HN ]
Mine is similar, but only does one cd command - to allow better use of `cd -`
up() {
local ups="."
for((i=0;i<${1:-1};i++)); do
ups="${ups}/.."
done
builtin cd "$ups"
}"cd -" is equal to "cd $OLDPWD", so that still works with my function ;)
Though yours looks much nicer ^^"