https://github.com/desertbit/turban
Turban Shell - A simple shell experience.
https://github.com/desertbit/turban
Last synced: 6 months ago
JSON representation
Turban Shell - A simple shell experience.
- Host: GitHub
- URL: https://github.com/desertbit/turban
- Owner: desertbit
- License: gpl-3.0
- Created: 2016-09-09T01:01:44.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-09-16T23:13:47.000Z (almost 10 years ago)
- Last Synced: 2024-06-20T06:28:24.898Z (about 2 years ago)
- Language: Go
- Size: 60.5 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Turban Shell
[](https://godoc.org/github.com/desertbit/turban)
[](https://goreportcard.com/report/github.com/desertbit/turban)
A simple shell experience.

## Turban Application
There is a turban shell application available in the cmd directory.
It reads a TURBAN.toml file and provides a simple shell.
```
go get -u github.com/desertbit/turban
go install github.com/desertbit/turban/cmd/turban
turban -p "prompt text" -d "path to directory"
```
## Library Sample
```go
package main
import (
"fmt"
"github.com/desertbit/turban"
)
func main() {
turban.SetPrompt("TURBAN » ")
turban.SetHelpHeader("TURBAN - A simple shell experience")
turban.SetPrintASCIIArtFunc(printASCIIArt)
turban.AddCommand("foo", &turban.Command{
Help: "Print foo help text",
Usage: "foo [BAR]",
Run: func(args []string) error {
// ...
return nil
},
})
turban.Run(true)
}
func printASCIIArt() {
fmt.Println("____ _ _ ___ ___ __ _ _ ")
fmt.Println(" )) ))`) ))_) ))_) /_`) )\\`)")
fmt.Println("(( ((_( ((`\\ ((__)(( ( ((`( ")
fmt.Println("")
}
```