Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sivel/powerline-shell-go
Attempted fork of powerline-shell into Go
https://github.com/sivel/powerline-shell-go
Last synced: 3 months ago
JSON representation
Attempted fork of powerline-shell into Go
- Host: GitHub
- URL: https://github.com/sivel/powerline-shell-go
- Owner: sivel
- License: apache-2.0
- Created: 2014-04-13T01:22:23.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2018-10-10T16:32:07.000Z (over 6 years ago)
- Last Synced: 2024-10-04T13:39:25.927Z (4 months ago)
- Language: Go
- Size: 11.7 KB
- Stars: 17
- Watchers: 3
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# powerline-shell-go
Attempted fork of [powerline-shell](https://github.com/milkbikis/powerline-shell) into [Go](http://golang.org/)
This application does not cover all features of powerline-shell, only those that I currently use, and it is not configurable.
## Usage
Install the binary with
go get github.com/sivel/powerline-shell-go
go install github.com/sivel/powerline-shell-go### Bash
Install powerline-shell-go and add the following to your `~/.bashrc`
function _update_ps1() {
export PS1="$(powerline-shell-go bash $? 2> /dev/null)"
}export PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
### Zsh
Install powerline-shell-go and add the following to your `~/.zshrc`
function powerline_precmd() {
export PS1="$(powerline-shell-go zsh $? 2> /dev/null)"
}function install_powerline_precmd() {
for s in "${precmd_functions[@]}"; do
if [ "$s" = "powerline_precmd" ]; then
return
fi
done
precmd_functions+=(powerline_precmd)
}install_powerline_precmd
## Performance
```
$ time ~/git/milkbikis/powerline-shell/powerline-shell.py > /dev/null
real 0m0.092s
user 0m0.027s
sys 0m0.046s
``````
$ time ~/go/src/github.com/sivel/powerline-shell/powerline-shell > /dev/null
real 0m0.007s
user 0m0.002s
sys 0m0.004s
```