DEV Community

mirko
mirko

Posted on

A toy shell to play with go

Hi it's Mirko here.

My learning about go continues.

I have created another learning project to play with the language syntax.
Gosh is a simple toy shell.

Features

  • Builtin functions: ciao, bye
  • Suggestion of command options
  • Possibility to extend suggestions to other commands

The project is available on Github and it is released under Common Creative Zero lincense

Any feedback about the code or the features is welcome!! 🙏🏻

Top comments (2)

Collapse
 
faraazahmad profile image
Syed Faraaz Ahmad

Seems kinda cool can you please elaborate a bit more about the commands and maybe show screenshot of its usage

Collapse
 
mirkoperillo profile image
mirko

Thank you, I will try to explain command suggestions in a better way.
The shell tries to provide you the possible options of a command. The experience is something similar, but more simple, of the suggestions provided by zsh
When you type a command and a partial options you can click TAB and shell will provide all matching options for that command.
Technically speaking I've used termbox-go to implement the interaction and trie data structure to calculate the matching options.
gosh is extensible setting the options of you favorite commands.
Maybe in the next days I will produce some animated GIF to explain the usage in more easy way.
I hope is more clear now.