MCPcopy Create free account

hub / github.com/Bowery/prompt / functions

Functions69 in github.com/Bowery/prompt

↓ 25 callersMethodString
String returns the data as a string.
buffer.go:31
↓ 14 callersMethodWrite
Write writes data from b into the input file.
ansi_unix.go:37
↓ 14 callersMethodfinish
finish finishes an ANSI escape code and calls the parsing function. Afterwards the escape buffer is emptied.
ansi_windows.go:501
↓ 12 callersMethodlongFunction
longFunction creates a long function code.
ansi_windows.go:221
↓ 10 callersMethodRefresh
Refresh rewrites the prompt and buffer.
buffer_unix.go:12
↓ 6 callersMethodEndLine
EndLine ends the line with CRLF.
buffer.go:136
↓ 5 callersMethodClose
Close calls close on the internal terminal.
term.go:181
↓ 5 callersFunctionNewTerminal
NewTerminal creates a terminal and sets it to raw input mode.
term.go:59
↓ 4 callersMethodCustom
Custom gets input and calls the given test function with the input to check if the input is valid, a true return will return the string.
term.go:124
↓ 4 callersMethodarrow
arrow creates an arrow code.
ansi_windows.go:237
↓ 4 callersMethodshortFunction
shortFunction creates a short function code.
ansi_windows.go:206
↓ 2 callersMethodBasic
Basic gets input and if required tests to ensure input was given.
term.go:77
↓ 2 callersMethodClsScreen
ClsScreen clears the screen and refreshes.
buffer_unix.go:69
↓ 2 callersMethodDelLeft
DelLeft removes the character to the left.
buffer.go:122
↓ 2 callersMethodInsert
Insert inserts characters at the cursors position.
buffer.go:36
↓ 2 callersFunctionNewAnsiReader
NewAnsiReader creates a AnsiReader from the given input file.
ansi_unix.go:17
↓ 2 callersFunctionNewBuffer
NewBuffer creates a buffer writing to out if echo is true.
buffer.go:22
↓ 2 callersMethodPassword
Password retrieves a password from stdin without echoing it.
term.go:142
↓ 2 callersMethodRead
Read reads data from the input file into b.
ansi_unix.go:22
↓ 2 callersMethodSet
Set sets the content in the buffer.
buffer.go:59
↓ 2 callersMethoddelLine
delLine deletes the line the csbi cursor is positioned on. TODO: Possible refresh jittering reason, instead we should copy the Unix code and write ove
buffer_windows.go:110
↓ 2 callersMethodmvLeftEdge
mvLeftEdge moves the cursor to the beginning of the line the csbi cursor is positioned on.
buffer_windows.go:126
↓ 2 callersFunctionnewTerminal
newTerminal creates a terminal and sets it to raw input mode.
term_unix.go:42
↓ 2 callersMethodread
read reads a rune and parses ANSI escape sequences found
term.go:235
↓ 2 callersFunctionsetTermios
setTermios sets the termios settings for the terminal descriptor, optionally flushing the buffer before setting.
ioctl_unix.go:49
↓ 2 callersMethodsetup
setup initializes a prompt.
term.go:217
↓ 2 callersMethodsimplePrompt
simplePrompt is a fallback prompt without line editing support.
term.go:199
↓ 2 callersFunctiontoBytes
toBytes converts a slice of runes to its equivalent in bytes.
buffer.go:142
↓ 1 callersMethodAsk
Ask gets input and checks if it's truthy or not, and returns that in a boolean fashion.
term.go:100
↓ 1 callersMethodBasicDefault
BasicDefault gets input and if empty uses the given default.
term.go:88
↓ 1 callersMethodDel
Del removes the character at the cursor position.
buffer.go:109
↓ 1 callersMethodEnd
End moves the cursor to the end.
buffer.go:79
↓ 1 callersMethodGetPassword
GetPassword gets a line with the prefix and doesn't echo input.
term.go:169
↓ 1 callersMethodGetPrompt
GetPrompt gets a line with the prefix and echos input.
term.go:157
↓ 1 callersFunctionIsNotTerminal
IsNotTerminal checks if an error is related to the input not being a terminal.
term.go:39
↓ 1 callersMethodLeft
Left moves the cursor one character left.
buffer.go:89
↓ 1 callersMethodRefresh
Refresh rewrites the prompt and buffer.
buffer_windows.go:15
↓ 1 callersMethodRight
Right moves the cursor one character right.
buffer.go:99
↓ 1 callersMethodStart
Start moves the cursor to the start.
buffer.go:69
↓ 1 callersFunctionTerminalSize
TerminalSize retrieves the columns/rows for the terminal connected to out.
term.go:44
↓ 1 callersFunctiongetTermios
getTermios retrieves the termios settings for the terminal descriptor.
ioctl_unix.go:35
↓ 1 callersFunctionisNotTerminal
isNotTerminal checks if an error is related to the input not being a terminal.
term_unix.go:30
↓ 1 callersMethodmvToCol
mvTolCol moves the cursor to the col on the line the csbi cursor is positioned on.
buffer_windows.go:140
↓ 1 callersMethodpassword
password reads from in and parses restricted ANSI escapes writing to buf.
term.go:458
↓ 1 callersMethodprompt
prompt reads from in and parses ANSI escapes writing to buf.
term.go:336
↓ 1 callersFunctionsupportsEditing
supportsEditing checks if the terminal supports ansi escapes.
term_unix.go:17
↓ 1 callersFunctionterminalSize
terminalSize retrieves the cols/rows for the terminal connected to out.
ioctl_unix.go:22
FunctionAsk
Ask is a wrapper around Terminal.Ask.
prompt.go:55
FunctionBasic
Basic is a wrapper around Terminal.Basic.
prompt.go:33
FunctionBasicDefault
BasicDefault is a wrapper around Terminal.BasicDefault.
prompt.go:44
MethodClose
Close disables the terminals raw input.
term_unix.go:87
MethodClose
Close disables the terminals raw input.
term_windows.go:107
MethodClsScreen
ClsScreen clears the screen and refreshes.
buffer_windows.go:78
FunctionCustom
Custom is a wrapper around Terminal.Custom.
prompt.go:66
FunctionExampleBasic
()
example_test.go:19
FunctionExamplePassword
()
example_test.go:10
FunctionNewAnsiReader
NewAnsiReader creates a AnsiReader from the given input file.
ansi_windows.go:46
FunctionNewAnsiWriter
NewAnsiWriter creates a AnsiWriter from the given output file.
ansi_unix.go:32
FunctionNewAnsiWriter
NewAnsiWriter creates a AnsiWriter from the given output.
ansi_windows.go:259
FunctionPassword
Password is a wrapper around Terminal.Password.
prompt.go:77
MethodRead
Read reads data from the input converting to ANSI escape codes that can be read over multiple Reads.
ansi_windows.go:52
MethodReopen
Reopen re-opens an internal terminal.
term.go:186
MethodWrite
Write writes the buffer filtering out ANSI escape codes and converting to the Windows functionality needed. ANSI escape codes may be found over multip
ansi_windows.go:266
FunctiongetTermios
getTermios retrieves the termios settings for the terminal descriptor.
ioctl_sysunix.go:30
FunctionisNotTerminal
isNotTerminal checks if an error is related to the input not being a terminal.
term_windows.go:70
FunctionnewTerminal
newTerminal creates a terminal and sets it to raw input mode.
term_windows.go:84
FunctionsetTermios
setTermios sets the termios settings for the terminal descriptor, optionally flushing the buffer before setting.
ioctl_sysunix.go:36
FunctionterminalSize
terminalSize retrieves the cols/rows for the terminal connected to out.
ioctl_sysunix.go:20
FunctionterminalSize
terminalSize retrieves the cols/rows for the terminal connected to out.
term_windows.go:54