add cdt function

This commit is contained in:
PowerUser64 2023-05-28 16:41:39 -07:00
parent a17f72a177
commit 5f7bd5142c

View file

@ -0,0 +1,8 @@
#!/bin/sh
# This will "cd to" the directory a file is in
# Usage:
# cdt <directory>
cdt() {
cd "$(dirname "$(realpath "$1")")"
}