#7217 closed bug (invalid)
Queries ignore "["
Reported by: | humdinger | Owned by: | anevilyak |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Kits/libtracker.so | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
This is hrev40457.
- Create a file and name it "[file]"
- Do a query by attribute for file names beginning with "["
--> won't find it.
"]" on the other hand works...
Change History (8)
comment:1 by , 14 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 14 years ago
Right. But that's something the user should only have to care about himself when he's geek-land, i.e. formula-mode. Shouldn't by name and by attribute mode always auto-escape?
comment:3 by , 14 years ago
Frankly, I don't completely agree with the philosophy that every last thing has to be dumbed down, I'd rather see some nice hints about what's possible with queries in the find panel. Making every last thing a PITA for a more experienced/advanced user would be incredibly annoying, unless you want to drive away all the people working on the OS.
comment:4 by , 14 years ago
While I'd agree not to unnecessarily dumbing down things, in this case I'm not so sure. Having to escape characters is familiar to people that are no strangers to the Terminal, not to the general GUI trained user which is still Haiku's main target.
The best solution may be to deal with it like in TextSearch, i.e. another checkbox besides "including Trash" and "temporary" with a standardly checked "Auto-escape" (with a tooltip explaining escaping).
follow-up: 6 comment:5 by , 14 years ago
Like anyone would understand what "auto-escape" means -- please not. But the idea itself is good, I would just do it the other way around, ie. something like "Enable wildcards" or "Enable patterns".
comment:6 by , 14 years ago
Replying to axeld:
Like anyone would understand what "auto-escape" means -- please not. But the idea itself is good, I would just do it the other way around, ie. something like "Enable wildcards" or "Enable patterns".
Is that really necessary? I mean there already is the formula mode where wildcards/patterns are enabled.
comment:7 by , 14 years ago
I'm with Ingo and humdinger; the formula mode should do patterns, whereas standard search should just treat the input literally (with the current case-insensitivity addition maintained, of course).
comment:8 by , 14 years ago
I find the formula mode a bit awkward to use, but would still like to make use of wildcards. But I could live with using that one, too, I guess -- after all, the Tracker already uses its query logic on all strings, not just the name field.
That's because [ has special meaning in the query language, it begins a character class (which is also how case insensitive queries are done, i.e. [aA] will match either one). If you want to look for that particular character, or any others that have special meaning in queries like *, you'll need to escape it, i.e. \[.