diff --git a/.config/shell/functions/cdt b/.config/shell/functions/cdt new file mode 100644 index 0000000..b06dbfd --- /dev/null +++ b/.config/shell/functions/cdt @@ -0,0 +1,8 @@ +#!/bin/sh +# This will "cd to" the directory a file is in +# Usage: +# cdt + +cdt() { + cd "$(dirname "$(realpath "$1")")" +}