peterh / liner

Pure Go line editor with history, inspired by linenoise
MIT License
1.05k stars 132 forks source link

I have doubt on PrefixHistory #136

Closed jievince closed 4 years ago

jievince commented 4 years ago
            case ctrlP: // up
                historyAction = true
                if historyStale {
                    historyPrefix = s.getHistoryByPrefix(string(line))
                    historyPos = len(historyPrefix)
                    historyStale = false
                }

liner checks prefix when searching for history via pressing Up or Down, while Linux shell doesn't check the prefix.

peterh commented 4 years ago

You are correct, liner is unlike bash in this instance.

Language note: In English, the phrase "I have a doubt" is pejorative. I don't believe you were trying to insult me, I believe we are victims of a poor translation. Better would be "I have a question" (although in this case, you didn't phrase it as a question, so perhaps "I am uncertain" would be better). I have seen this particular incorrect translation in many places, so if you could file a bug report with your dictionary and/or translation software and/or language teacher, I would appreciate it.

jievince commented 4 years ago

Hi peterh, my English is not good. I used translation software to express my meaning. I apologize for using the wrong syntax.