'eval' serves no purpose here either
This commit is contained in:
@@ -75,7 +75,8 @@ git_add_shortcuts() {
|
|||||||
# Does nothing if no args are given.
|
# Does nothing if no args are given.
|
||||||
git_silent_add_shortcuts() {
|
git_silent_add_shortcuts() {
|
||||||
if [ -n "$1" ]; then
|
if [ -n "$1" ]; then
|
||||||
function process {
|
# Expand args and process resulting set of files.
|
||||||
|
for file in $(git_expand_args "$@"); do
|
||||||
file=$1
|
file=$1
|
||||||
# Use 'git rm' if file doesn't exist and 'ga_auto_remove' is enabled.
|
# Use 'git rm' if file doesn't exist and 'ga_auto_remove' is enabled.
|
||||||
if [[ $ga_auto_remove == "yes" ]] && ! [ -e "$file" ]; then
|
if [[ $ga_auto_remove == "yes" ]] && ! [ -e "$file" ]; then
|
||||||
@@ -85,10 +86,7 @@ git_silent_add_shortcuts() {
|
|||||||
git add "$file"
|
git add "$file"
|
||||||
echo -e "# add '$file'"
|
echo -e "# add '$file'"
|
||||||
fi
|
fi
|
||||||
}
|
done
|
||||||
|
|
||||||
# Expand args and process resulting set of files.
|
|
||||||
eval for file in $(git_expand_args "$@")\; do process "\$file"\; done
|
|
||||||
echo "#"
|
echo "#"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user