Skip to content

Latest commit

 

History

47 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Termy 📺

(pronounced tˈɜːmi)

PKG Termy facilitates access to basic (terminal emulator's) functionality.


termy.go allows you to put your terminal in non-cooked modes.

package main

import "github.com/mec-nyan/termy"


func main() {

	t := termy.New(int(os.Stdin.Fd()), false)
	err := t.Cbreaky()
	if err != nil {
		...
	}
	defer t.Restore()

	// Your code...

}

escapy.go provides function to send in-band control sequences to your terminal.

func main() {

	// ...

	termy.SaveCurPos() // Save current cursor position.


	// Do stuff.

	termy.RestoreCurPos() // Go back to saved position.
	termy.ClearToEOS()    // Clean up.

	// ...
}

TODO: I'll soon add capabilities for styles, colours, etc.

About

Basic terminal handling for CLI applications.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages