+ ;;
+ esac
+}
+
+# Returns the actual name of the given file that is on the user's disk
+# This command applies shell pattern matching and return the actual filename
+retrieve_existing_filename() {
+ FILE_PATH=$(apply_shell_expansion "$1")
+
+ # return filename if found, nothing else
+ if has_pattern "$FILE_PATH"; then
+ dir="$(dirname "$FILE_PATH")"
+ part="$(basename "$FILE_PATH")"
+ find "$dir" -maxdepth 1 -name "$part" -print -quit 2>/dev/null