func remove(slice []string, i int) []string {
	return append(slice[:i], slice[i+1:]...)
}
remove deletes an element from a slice of strings
package commands
import (
	"encoding/json"
	"strings"
	"github.com/abiosoft/ishell"
	"github.com/bwhaley/ssmsh/config"
	"github.com/bwhaley/ssmsh/parameterstore"
)
type fn func(*ishell.Context)
var (
	shell *ishell.Shell
	ps    *parameterstore.ParameterStore
	cfg   *config.Config
)
func Init(iShell *ishell.Shell, iPs *parameterstore.ParameterStore, iCfg *config.Config) {
	shell = iShell
	ps = iPs
	cfg = iCfg
	registerCommand("cd", "change your relative location within the parameter store", cd, cdUsage)
	registerCommand("cp", "copy source to dest", cp, cpUsage)
	registerCommand("decrypt", "toggle parameter decryption", decrypt, decryptUsage)
	registerCommand("get", "get parameters", get, getUsage)
	registerCommand("history", "get parameter history", history, historyUsage)
	registerCommand("key", "set the KMS key", key, keyUsage)
	registerCommand("ls", "list parameters", ls, lsUsage)
	registerCommand("mv", "move parameters", mv, mvUsage)
	registerCommand("policy", "create named parameter policy", policy, policyUsage)
	registerCommand("profile", "switch to a different AWS IAM profile", profile, profileUsage)
	registerCommand("put", "set parameter", put, putUsage)
	registerCommand("region", "change region", region, regionUsage)
	registerCommand("rm", "remove parameters", rm, rmUsage)
	setPrompt(parameterstore.Delimiter)
}
func registerCommand(name string, helpText string, f fn, usageText string) {
	shell.AddCmd(&ishell.Cmd{
		Name:     name,
		Help:     helpText,
		LongHelp: usageText,
		Func:     f,
	})
}
func setPrompt(prompt string) {
	shell.SetPrompt(prompt + ">")
}