zsh: almost all functions are scripts now (part 2)
This commit is contained in:
parent
75c3986785
commit
ec0cee28d9
14 changed files with 287 additions and 0 deletions
14
.config/shell/bin/cdf
Executable file
14
.config/shell/bin/cdf
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
# cd find (interactive): cd to the containing dir of a file, or inside a folder, given part of its name
|
||||
# Basically, an interactive version of what's above
|
||||
# can take an `fd` command
|
||||
# requires that `fzy` is installed
|
||||
|
||||
DIR="$(fd $@ | fzy)"
|
||||
if [ -f "$DIR" ];then
|
||||
cd "$(dirname "$DIR")" && pwd
|
||||
else
|
||||
cd "$DIR" && pwd
|
||||
fi
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue