screen

package module
v0.0.0-...-c22d666 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2019 License: MIT Imports: 6 Imported by: 0

README

go-screen

Run shell commands in GNU Screen using Golang.

Requriements

Install

$ go get -u github.com/RepSklvska/go-screen

Example

package main

import "github.com/RepSklvska/go-screen"

func main() {
	var (
		command = []string{"emacs", "-nw"}
		tty     = "abc"
	)
	
	screen.Execute(tty, command...)
}

Then you can find the session with "screen -ls" command.

Documentation

Index

Constants

View Source
const (
	Detached    = true
	NotDetached = false
)

Variables

This section is empty.

Functions

func Create

func Create(tty string, a ...string) error

func Detach

func Detach(tty string) error

func Execute

func Execute(tty string, a ...string) error

func Kill

func Kill(tty string) error

func View

func View(tty string) string

Types

type Screen

type Screen struct {
	PID    string
	Name   string
	Time   string
	Host   string
	Status bool
}

func List

func List() ([]Screen, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL