From 0888cd1fb17a604fe6932e4dbfc34ffb1de5235d Mon Sep 17 00:00:00 2001 From: Brian Hicks Date: Tue, 21 Jan 2020 13:46:42 -0600 Subject: [PATCH] make find-and-edit work in deeper git subdirectories --- dotfiles/zsh/find-and-edit.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotfiles/zsh/find-and-edit.zsh b/dotfiles/zsh/find-and-edit.zsh index 9459204..d6c43b7 100644 --- a/dotfiles/zsh/find-and-edit.zsh +++ b/dotfiles/zsh/find-and-edit.zsh @@ -1,7 +1,7 @@ ## finding files quickly find_and_edit() { - if test -d .git; then + if git status > /dev/null; then SOURCE="$(git ls-files --others --cached --exclude-standard)" else SOURCE="$(find . -type f)"