Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wintermi/zsh-golang
A simple zsh plugin for the Go programming language toolchain.
https://github.com/wintermi/zsh-golang
golang zsh zsh-plugin
Last synced: 2 months ago
JSON representation
A simple zsh plugin for the Go programming language toolchain.
- Host: GitHub
- URL: https://github.com/wintermi/zsh-golang
- Owner: wintermi
- License: apache-2.0
- Created: 2023-01-01T09:32:51.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-01T12:08:59.000Z (about 1 year ago)
- Last Synced: 2024-04-15T03:59:58.347Z (9 months ago)
- Topics: golang, zsh, zsh-plugin
- Language: Shell
- Homepage:
- Size: 111 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zsh-golang
A zsh plugin for the Go programming language toolchain.## Install
Using the [:zap: Zap](https://www.zapzsh.org/) minimal zsh plugin manager, add the following to your `.zshrc````sh
# Install plugin
plug "wintermi/zsh-golang"
```## Prerequisite Checks
A number of checks are performed to verify the following Go programming language tools have been installed:- [`g`](https://github.com/stefanmaric/g) - A simple go version manager
- [`go`](https://github.com/golang/go) - The Go programming language
- [`gofmt`](https://pkg.go.dev/cmd/gofmt) - Formats Go programs## Environment
By default, the following go environment variables will be setup```sh
export GOPATH="$HOME/go"
export GOROOT="$HOME/.go"
````$GOPATH/bin` is also added to the `PATH`.
If a different environment location is required, these variables can be defined prior to installing the plugin, as shown below
```sh
# Install plugin with a different environment location
export GOROOT="$HOME/.local/share/golang"
export GOPATH="$HOME/MyProjects/go-projects"
plug "wintermi/zsh-golang"
```## Tab Completions
Tab completions are provided for `g`, `go` and `gofmt` commands. An example of which can be seen below.![g-install-tab-completion](https://user-images.githubusercontent.com/33818/210471572-251ff711-d082-4e09-b54e-a74c716d022f.jpg)
## License
The **zsh-golang** plugin is released under the [Apache License 2.0](https://github.com/wintermi/zsh-golang/blob/main/LICENSE) unless explicitly mentioned in the file header.