ignore .git files

This commit is contained in:
BarbUk 2017-04-13 11:17:31 +04:00
parent 7e7b0a8c65
commit 775ad8fad5

2
snippy
View File

@ -69,7 +69,7 @@ run(){
cd "${DIR}" || exit cd "${DIR}" || exit
# Use the filenames in the snippy directory as menu entries. # Use the filenames in the snippy directory as menu entries.
# Get the menu selection from the user. # Get the menu selection from the user.
FILE=$(find -L . -type f | grep -v '^\.$' | sed 's!\.\/!!' | ${MENU_ENGINE} ${MENU_ARGS}) FILE=$(find -L . -type f | grep -v '^\.$' | sed 's!\.\/!!' | grep -v .git/ | ${MENU_ENGINE} ${MENU_ARGS})
# just return if nothing was selected # just return if nothing was selected
[[ -z "${FILE}" ]] && return 1 [[ -z "${FILE}" ]] && return 1