Clean code using shellspeck

pull/64/head
Miguel Silvestre 8 years ago
parent b8b2609ec2
commit 5a2049bd47

@ -18,15 +18,15 @@ function changes {
shift $((OPTIND-1)) shift $((OPTIND-1))
[ "$1" = '--' ] && shift [ "$1" = '--' ] && shift
local filenames="$@" local filenames=( "$@" )
if [[ -z "$filenames" ]]; then if [[ ${#filenames[@]} -eq 0 ]]; then
# Checking if no filenames are passed, show diff for all files. # Checking if no filenames are passed, show diff for all files.
filenames=$(git secret list) filenames=( $(git secret list) )
fi fi
IFS=' IFS='
' '
for filename in $filenames; do for filename in "${filenames[@]}"; do
local decrypted local decrypted
local content local content
local diff_result local diff_result

Loading…
Cancel
Save