https://github.com/ardnew/gosh
Stupid fast and sassy shell integration for Go
https://github.com/ardnew/gosh
ast bash command-line go go-library go-tools golang parser shell zsh
Last synced: 3 months ago
JSON representation
Stupid fast and sassy shell integration for Go
- Host: GitHub
- URL: https://github.com/ardnew/gosh
- Owner: ardnew
- License: mit
- Created: 2020-06-30T21:26:21.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-08-30T14:05:48.000Z (almost 3 years ago)
- Last Synced: 2024-11-15T13:45:00.428Z (over 1 year ago)
- Topics: ast, bash, command-line, go, go-library, go-tools, golang, parser, shell, zsh
- Language: Shell
- Homepage:
- Size: 269 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gosh
### Easily integrate Go with command-line shell environments
The [`github.com/ardnew/gosh`](https://github.com/ardnew/gosh) repo contains two primary utilities (written in pure Go) designed to **improve the quality of my personal life**.
See the respective `README.md` of each utility linked below for more information.
## [`cmd/gosh`](https://github.com/ardnew/gosh/tree/master/cmd/gosh) - Launch shell with YAML-driven environment
The `gosh` application dynamically creates an initialization file (e.g., `~/.bashrc`, `~/.zshrc`, etc.) for your shell by including the contents of various traditional shell scripts (e.g., `~/.bash_functions`, `~/.bash_aliases`, etc.) located in a configuration directory and grouped together by named "profile" keys in a YAML configuration file.
It is very flexible, noninvasive, and requires minimal convention.
## [`cmd/goshfun`](https://github.com/ardnew/gosh/tree/master/cmd/goshfun) - Generate command-line interface for Go library functions
The intent of `goshfun` is to automatically generate a command-line interface to much of the Go standard library. This means functions like `strings.Join`, `path/filepath.Split`, `math.Min`/`math.Max`, and a vast number of other really useful utilities, some of which not directly available in most modern shells, can be used directly from the command-line, using shell syntax, without having to write and compile any Go code whatsoever.
Interfaces are produced by analyzing function signatures of Go source code located in named packages the user provides to the parser/generator. Once generated, a single executable is produced through which the user can call any library function originally discovered.