mirror of
https://github.com/ddworken/hishtory.git
synced 2025-08-10 07:27:57 +02:00
Add support for quotes around colons when searching (#162)
This commit is contained in:
@ -1005,6 +1005,9 @@ func splitEscaped(query string, separator rune, maxSplit int) []string {
|
||||
} else if runeQuery[i] == '\'' && !isInDoubleQuotedString && !heuristicIgnoreUnclosedQuote(isInSingleQuotedString, '\'', runeQuery, i) {
|
||||
isInSingleQuotedString = !isInSingleQuotedString
|
||||
} else {
|
||||
if (isInSingleQuotedString || isInDoubleQuotedString) && separator == ' ' && runeQuery[i] == ':' {
|
||||
token = append(token, '\\')
|
||||
}
|
||||
token = append(token, runeQuery[i])
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user