crash.software
Projects
Pull Requests
Issues
Builds
reverse_ssh
Code
Files
Commits
Branches
Tags
Pull Requests
Code Comments
Code Compare
Issues
List
Boards
Milestones
Builds
Statistics
Contributions
Source Lines
Child Projects
Projects
STRLCPY
reverse_ssh
Files
🤬
Sign In
140f3a35
ROOT
/
internal
/
terminal
/
terminal.go
Search
History
1351 lines
|
ISO-8859-1
|
30 KB
Blame
Outline
2
4
8
No wrap
Soft wrap
Outline
ErrTrample
ErrCtrlC
ErrCtrlD
TerminalFunctionCallback
EscapeCodes
Black
:
[]byte
Red
:
[]byte
Green
:
[]byte
Yellow
:
[]byte
Blue
:
[]byte
Magenta
:
[]byte
Cyan
:
[]byte
White
:
[]byte
Reset
:
[]byte
vt100EscapeCodes
Terminal
user
:
*internal.User
cancel
:
chan bool
AutoCompleteCallback
:
func(term *Terminal, line string, pos int, key rune) (newLine string, newPos int, ok bool)
Escape
:
*EscapeCodes
lock
:
sync.Mutex
c
:
io.ReadWriter
prompt
:
[]rune
line
:
[]rune
pos
:
int
echo
:
bool
pasteActive
:
bool
cursorX
:
int
cursorY
:
int
maxLine
:
int
termWidth
:
int
termHeight
:
int
outBuf
:
[]byte
remainder
:
[]byte
inBuf
:
[256]byte
history
:
stRingBuffer
historyIndex
:
int
historyPending
:
string
autoCompleteIndex
:
int
autoCompletePos
:
int
autoCompletePendng
:
string
autoCompleting
:
bool
functions
:
map[string]Command
functionsAutoComplete
:
*trie.Trie
autoCompleteValues
:
map[string]*trie.Trie
raw
:
bool
NewTerminal
(c io.ReadWriter, prompt string)
:
*Terminal
NewAdvancedTerminal
(c io.ReadWriter, user *internal.User, prompt string)
:
*Terminal
collapse
(s string, char byte)
:
string
defaultAutoComplete
(term *Terminal, line string, pos int, key rune)
:
(newLine string, newPos int, ok bool)
buildDisplayLine
(focus Node, line string, match string, currentPos int)
:
(output string, newPos int)
keyCtrlC
keyCtrlD
keyCtrlU
keyEnter
keyEscape
keyBackspace
keyUnknown
keyUp
keyDown
keyLeft
keyRight
keyAltLeft
keyAltRight
keyHome
keyDel
keyEnd
keyDeleteWord
keyDeleteLine
keyClearScreen
keyPasteStart
keyPasteEnd
crlf
pasteStart
pasteEnd
bytesToKey
(b []byte, pasteActive bool)
:
(rune, []byte)
eraseUnderCursor
space
isPrintable
(key rune)
:
bool
maxLineLength
visualLength
(runes []rune)
:
int
writeWithCRLF
(w io.Writer, buf []byte)
:
(n int, err error)
pasteIndicatorError
Error
()
:
string
ErrPasteIndicator
stRingBuffer
entries
:
[]string
max
:
int
head
:
int
size
:
int
readPasswordLine
(reader io.Reader)
:
([]byte, error)
*Terminal
EnableRaw
()
DisableRaw
()
handleWindowSize
()
GetWidth
()
:
int
AddValueAutoComplete
(placement string, trie *trie.Trie)
:
error
AddCommands
(m map[string]Command)
:
error
Run
()
:
error
queue
(data []rune)
moveCursorToPos
(pos int)
move
(up, down, left, right int)
Read
(b []byte)
:
(n int, err error)
clearLineToRight
()
setLine
(newLine []rune, newPos int)
addCharacterToInput
(characters []byte)
advanceCursor
(places int)
eraseNPreviousChars
(n int)
countToLeftWord
()
:
int
countToRightWord
()
:
int
handleKey
(key rune)
:
(line string, ok bool)
addKeyToLine
(key rune)
writeLine
(line []rune)
Write
(buf []byte)
:
(n int, err error)
ReadPassword
(prompt string)
:
(line string, err error)
ReadLine
()
:
(line string, err error)
readLine
()
:
(line string, err error)
SetPrompt
(prompt string)
clearAndRepaintLinePlusNPrevious
(numPrevLines int)
SetSize
(width, height int)
:
error
SetBracketedPasteMode
(on bool)
resetAutoComplete
()
startAutoComplete
(lineFragment string, pos int)
*stRingBuffer
Add
(a string)
NthPreviousEntry
(n int)
:
(value string, ok bool)
All occurrences
Please wait...
Page is in error, reload to recover