Gosh is a simple shell written in Go.
go install github.com/bfontaine/gosh
- Go 1.2 or higher
- Readline
gosh
You’ll get a prompt, from which you can execute commands like in every other
shell. Use ^D
or exit
to exit it.
Just a basic REPL, right now.
Gosh doesn’t support quotes, escaping and wildcards, nor any loop or conditional constructions.
alias L=V
: add an aliasL
toV
.V
can be any command, even with spaces or weird characters. Aliases can’t be recursive.cd <path>
: change the current directory (can contain spaces)echo ...
: print stuff. You can insert environment variables with$var
or${var}
quit
,exit
,^D
: exit the shell
If a ~/.goshrc
file exists, Gosh reads it and executes it line-by-line as if
it were given on the prompt.
You can use it for common aliases, e.g.:
alias ll=ls -l
alias la=ls -la
Gosh currently supports the following options:
-debug
: show all errors-trace
: show all lines are they are executed, both from the~/.goshrc
and the interactive session
Use gosh -h
for more info.
- Vim: vim-gosh