zsh: add cdf() (cd file)
This commit is contained in:
parent
1fd0917970
commit
fca220a01e
1 changed files with 7 additions and 0 deletions
7
.zshrc
7
.zshrc
|
@ -171,6 +171,13 @@
|
|||
fi
|
||||
}
|
||||
|
||||
# cd file: cd to the containing dir of a file, given part of its name
|
||||
# can take an `fd` command
|
||||
# requires that `fzy` is installed
|
||||
cdf() {
|
||||
cd "$(dirname "$(fd $@ | fzy)")" && pwd
|
||||
}
|
||||
|
||||
# toggles whether a file or group of files is executable
|
||||
chx() {
|
||||
for FILE in "$@";do
|
||||
|
|
Loading…
Add table
Reference in a new issue