Skip to content

MrCyjaneK/gosh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gosh

Build Status

Simple shell written in golang.

To start an interactive shell you can do:

package main

import (
	"os"

	gosh "git.mrcyjanek.net/mrcyjanek/gosh/_core"
)

func main() {
	gosh.Start(os.Stdin, os.Stdout, os.Stderr)
}

Every command runs in separated environment (changing path in one command doesn't change it for rest). That's why cd is part of _core/, and echo is not. I think that this is a good idea... But I'm not sure (yet), about that.

Currently only basics work cd, ls, cat, printenv, nothing that could be actually used, no ;, |, &&, & and even no external command execution. Nothing.

If you need only one command, for example ls, you can include only it in your project check source.

Exit codes support is provided.

I'll try to stay as close as possible to sh.

About

Golang shell, to be used as an executable or as embedded shell.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages