added option to toggle case sensitivity

This commit is contained in:
Maneren
2021-04-26 10:16:04 +02:00
parent 79f9331031
commit a701716d99
+16 -4
View File
@@ -43,8 +43,14 @@ __zic_matched_subdir_list() {
if [[ "${seg[1]}" != "." && "${line[1]}" == "." ]]; then
continue
fi
if [[ "$line" == "$seg"* ]]; then
echo "$line"
if [ "$zic_case_insensitive" = "true" ]; then
if [[ "$line:u" == "$seg:u"* ]]; then
echo "$line"
fi
else
if [[ "$line" == "$seg"* ]]; then
echo "$line"
fi
fi
done
)
@@ -57,8 +63,14 @@ __zic_matched_subdir_list() {
if [[ "${seg[1]}" != "." && "${line[1]}" == "." ]]; then
continue
fi
if [[ "$line" == *"$seg"* ]]; then
echo "$line"
if [ "$zic_case_insensitive" = "true" ]; then
if [[ "$line:u" == *"$seg:u"* ]]; then
echo "$line"
fi
else
if [[ "$line" == *"$seg"* ]]; then
echo "$line"
fi
fi
done
fi