chzyer / readline

Readline is a pure go(golang) implementation for GNU-Readline kind library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to modify Prompt

firstsko opened this issue · comments

anything suggestion to modify Prompt with different forlder like linux shell?

anonymous@shell > ~

l, err := readline.NewEx(&readline.Config{
Prompt: "\033[32m"+prefix+"\033[0m ",
HistoryFile: "/tmp/readline.tmp",
AutoComplete: completer,
InterruptPrompt: "^C",
EOFPrompt: "exit",
HistorySearchFold: true,
FuncFilterInputRune: filterInput,
})