1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2025-06-14 08:41:43 +00:00

Check for non-empty files, not just existance

This commit is contained in:
Sorin Ionescu
2012-04-16 14:21:29 -04:00
parent 3ed8265e28
commit e5ec94af42
13 changed files with 14 additions and 14 deletions

View File

@ -28,7 +28,7 @@ if [[ "$1" == "-r" || "$1" == "--remove" ]]; then
fi
while (( $# > 0 )); do
if [[ ! -f "$1" ]]; then
if [[ ! -s "$1" ]]; then
print "$0: file not valid: $1" >&2
shift
continue

View File

@ -24,7 +24,7 @@ if [[ "$1" == "-v" || "$1" == "--verbose" ]]; then
fi
while (( $# > 0 )); do
if [[ ! -f "$1" ]]; then
if [[ ! -s "$1" ]]; then
print "$0: file not valid: $1" >&2
shift
continue