implemented push and pop commands, push command saves the wrong path though

This commit is contained in:
2024-11-27 23:44:47 +01:00
parent 51ea69194d
commit ce096d2430
4 changed files with 113 additions and 38 deletions
+4 -7
View File
@@ -4,18 +4,15 @@ export PATH="$PATH:$PWD/target/debug/"
pid=( $(ps -o ppid) )
arg_pid=" --pid ${pid[-2]} "
nav() {
cd "$(navigate ${arg_pid} $*)"
}
push() {
cd "$(navigate push ${arg_pid} $*)"
\builtin cd -- "$(navigate ${arg_pid} push $@)"
}
pop() {
cd "$(navigate pop ${arg_pid} $*)"
\builtin cd -- "$(navigate ${arg_pid} pop $@)"
}
stack() {
"navigate stack ${arg_pid}"
}
echo "$(navigate ${arg_pid} show $*)"
}