add cdt function
This commit is contained in:
parent
a17f72a177
commit
5f7bd5142c
1 changed files with 8 additions and 0 deletions
8
.config/shell/functions/cdt
Normal file
8
.config/shell/functions/cdt
Normal 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")")"
|
||||
}
|
Loading…
Add table
Reference in a new issue