mirror of
https://github.com/ddworken/hishtory.git
synced 2025-07-06 15:40:37 +02:00
Fix error when searching for just a literal colon
This commit is contained in:
@ -852,6 +852,9 @@ func parseNonAtomizedToken(token string) (string, any, any, any, error) {
|
||||
|
||||
func parseAtomizedToken(ctx context.Context, token string) (string, any, any, error) {
|
||||
splitToken := splitEscaped(token, ':', 2)
|
||||
if len(splitToken) != 2 {
|
||||
return "", nil, nil, fmt.Errorf("search query contains malformed search atom '%s'", token)
|
||||
}
|
||||
field := unescape(splitToken[0])
|
||||
val := unescape(splitToken[1])
|
||||
switch field {
|
||||
|
Reference in New Issue
Block a user