feat(consolidate): add period stripping from extensions in args
This commit is contained in:
parent
3764a8902c
commit
b3c33a0ca3
1 changed files with 3 additions and 1 deletions
|
@ -11,13 +11,15 @@ if [ $# -gt 0 ]; then
|
||||||
EXTENSIONS=()
|
EXTENSIONS=()
|
||||||
for var in $@
|
for var in $@
|
||||||
do
|
do
|
||||||
|
# Strip the . from the given extension if user gives the extension with a period (like .md)
|
||||||
|
var=${var/"."/}
|
||||||
EXTENSIONS+=("${var}")
|
EXTENSIONS+=("${var}")
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
echo "0 arguments entered. Searching all files"
|
echo "0 arguments entered. Searching all files"
|
||||||
EXTENSIONS=()
|
EXTENSIONS=()
|
||||||
fi
|
fi
|
||||||
echo ${EXTENSIONS}
|
echo ${EXTENSIONS[@]}
|
||||||
|
|
||||||
# Prepare a temporary file:
|
# Prepare a temporary file:
|
||||||
# Create a temporary file that will hold patterns from the ".gitignore" file.
|
# Create a temporary file that will hold patterns from the ".gitignore" file.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue