mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-25 06:22:24 +02:00
Rename variable so it doesn't contain TODO
This commit is contained in:
parent
4006eef1e1
commit
8c239a32b9
@ -36,13 +36,13 @@ func fuzzTest(t *testing.T, tester shellTester, input string) {
|
|||||||
if len(split2) != 2 {
|
if len(split2) != 2 {
|
||||||
panic("malformed: split2")
|
panic("malformed: split2")
|
||||||
}
|
}
|
||||||
thingToDo := split1[1]
|
unparsedOperation := split1[1]
|
||||||
cmd := ""
|
cmd := ""
|
||||||
redactQuery := ""
|
redactQuery := ""
|
||||||
if strings.HasPrefix(thingToDo, "!") {
|
if strings.HasPrefix(unparsedOperation, "!") {
|
||||||
redactQuery = thingToDo[1:]
|
redactQuery = unparsedOperation[1:]
|
||||||
} else {
|
} else {
|
||||||
cmd = "echo " + thingToDo
|
cmd = "echo " + unparsedOperation
|
||||||
}
|
}
|
||||||
re := regexp.MustCompile(`[a-zA-Z]+`)
|
re := regexp.MustCompile(`[a-zA-Z]+`)
|
||||||
if !re.MatchString(cmd) && cmd != "" {
|
if !re.MatchString(cmd) && cmd != "" {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user