28 lines
456 B
Go
28 lines
456 B
Go
package termutil
|
|
|
|
type Option func(t *Terminal)
|
|
|
|
func WithTheme(theme *Theme) Option {
|
|
return func(t *Terminal) {
|
|
t.theme = theme
|
|
}
|
|
}
|
|
|
|
func WithShell(shell string) Option {
|
|
return func(t *Terminal) {
|
|
t.shell = shell
|
|
}
|
|
}
|
|
|
|
func WithInitialCommand(cmd string) Option {
|
|
return func(t *Terminal) {
|
|
t.initialCommand = cmd + "\n"
|
|
}
|
|
}
|
|
|
|
func WithWindowManipulator(m WindowManipulator) Option {
|
|
return func(t *Terminal) {
|
|
t.windowManipulator = m
|
|
}
|
|
}
|