Skip to content

Commit 06dbc99

Browse files
committed
feat: Add basic cd_push/cd_pop utilities
These just wrap around the builtins with standard input redirected to devnull
1 parent b297ac6 commit 06dbc99

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

pkg/src/public/cd.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# shellcheck shell=bash
2+
3+
utility.cd_push() {
4+
if pushd "$@" >/dev/null; then :; else
5+
return $?
6+
fi
7+
}
8+
9+
utility.cd_pop() {
10+
if popd "$@" >/dev/null; then :; else
11+
return $?
12+
fi
13+
}

0 commit comments

Comments
 (0)