(zsh) add function ed
This commit is contained in:
parent
6caf4b1178
commit
f6161f2bee
1 changed files with 15 additions and 0 deletions
15
zsh/.zshrc
15
zsh/.zshrc
|
|
@ -166,6 +166,21 @@ sngrok() {
|
||||||
ngrok http --domain=hyena-merry-literally.ngrok-free.app $1
|
ngrok http --domain=hyena-merry-literally.ngrok-free.app $1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# helper function to fuzzy search files in the current working directory
|
||||||
|
ed() {
|
||||||
|
local f=""
|
||||||
|
|
||||||
|
if [ $# -eq 1 ]; then
|
||||||
|
f=$(find . | grep -Ev "node_modules|\.git" | fzf --filter="$1" --select-1 --exit-0 | head -1)
|
||||||
|
else
|
||||||
|
f=$(find . | grep -Ev "node_modules|\.git" | fzf)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$f" ]; then
|
||||||
|
nvim "$f"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Load colors if possible
|
# Load colors if possible
|
||||||
autoload -U colors && colors
|
autoload -U colors && colors
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue