summaryrefslogtreecommitdiff
path: root/cmds/env.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmds/env.go')
-rw-r--r--cmds/env.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmds/env.go b/cmds/env.go
index 5f09df6..17b220d 100644
--- a/cmds/env.go
+++ b/cmds/env.go
@@ -10,7 +10,7 @@ import (
)
// printEnv: prints all environment variables with shell options.
-func printEnv() {
+func PrintEnv() {
vars := os.Environ()
for i := range vars {
fmt.Println(vars[i])
@@ -21,7 +21,7 @@ func printEnv() {
}
// set: sets the shell options
-func set(args []string) {
+func Set(args []string) {
for i := 1; i < len(args); i++ {
if i-1 >= len(global.Options) {
global.Options = append(global.Options, args[i])
@@ -36,7 +36,7 @@ func set(args []string) {
}
// unset: unsets an environment variable
-func unset(args []string) error {
+func Unset(args []string) error {
if len(args) == 1 || len(args) >= 3 {
return errors.New("usage: unset [name]")
}
@@ -46,7 +46,7 @@ func unset(args []string) error {
// export: exports a key-value pair to the environment
// in the form of `name=value`
-func export(args []string) error {
+func Export(args []string) error {
if len(args) == 1 || len(args) >= 3 {
return errors.New("usage: export [name=value]")
}