diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..afd111b --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +resh-collect +resh-daemon diff --git a/collect/resh-collect.go b/collect/resh-collect.go index d91dab2..7849d17 100644 --- a/collect/resh-collect.go +++ b/collect/resh-collect.go @@ -5,12 +5,14 @@ import ( "encoding/json" "flag" "fmt" - "github.com/BurntSushi/toml" - common "github.com/curusarn/resh/common" "io/ioutil" "log" "net/http" "os" + + "github.com/BurntSushi/toml" + common "github.com/curusarn/resh/common" + // "os/exec" "os/user" "path/filepath" @@ -52,7 +54,7 @@ func main() { lang := flag.String("lang", "", "$LANG") lcAll := flag.String("lcAll", "", "$LC_ALL") login := flag.String("login", "", "$LOGIN") - path := flag.String("path", "", "$PATH") + // path := flag.String("path", "", "$PATH") pwd := flag.String("pwd", "", "$PWD - present working directory") pwdAfter := flag.String("pwdAfter", "", "$PWD after command") shellEnv := flag.String("shellEnv", "", "$SHELL") @@ -102,18 +104,18 @@ func main() { os.Exit(0) } if *requireVersion != "" && *requireVersion != Version { - fmt.Println("Please restart/reload this terminal session " + + fmt.Println("Please restart/reload this terminal session " + "(resh version: " + Version + " resh version of this terminal session: " + *requireVersion + ")") - os.Exit(3) + os.Exit(3) } if *requireRevision != "" && *requireRevision != Revision { - fmt.Println("Please restart/reload this terminal session " + + fmt.Println("Please restart/reload this terminal session " + "(resh revision: " + Revision + " resh revision of this terminal session: " + *requireRevision + ")") - os.Exit(3) + os.Exit(3) } realtimeAfter, err := strconv.ParseFloat(*rta, 64) if err != nil { @@ -178,11 +180,11 @@ func main() { Cols: *cols, Lines: *lines, - Home: *home, - Lang: *lang, - LcAll: *lcAll, - Login: *login, - Path: *path, + Home: *home, + Lang: *lang, + LcAll: *lcAll, + Login: *login, + // Path: *path, Pwd: *pwd, PwdAfter: *pwdAfter, ShellEnv: *shellEnv, diff --git a/common/resh-common.go b/common/resh-common.go index b456d2b..aa2bb92 100644 --- a/common/resh-common.go +++ b/common/resh-common.go @@ -9,13 +9,13 @@ type Record struct { SessionId string `json:"sessionId"` // posix - Cols string `json:"cols"` - Lines string `json:"lines"` - Home string `json:"home"` - Lang string `json:"lang"` - LcAll string `json:"lcAll"` - Login string `json:"login"` - Path string `json:"path"` + Cols string `json:"cols"` + Lines string `json:"lines"` + Home string `json:"home"` + Lang string `json:"lang"` + LcAll string `json:"lcAll"` + Login string `json:"login"` + //Path string `json:"path"` Pwd string `json:"pwd"` PwdAfter string `json:"pwdAfter"` ShellEnv string `json:"shellEnv"` diff --git a/shellrc.sh b/shellrc.sh index 556367d..613348d 100644 --- a/shellrc.sh +++ b/shellrc.sh @@ -112,7 +112,7 @@ __resh_preexec() { __RESH_LC_ALL="$LC_ALL" # other LC ? __RESH_LINES="$LINES" - __RESH_PATH="$PATH" + # __RESH_PATH="$PATH" __RESH_PWD="$PWD" # non-posix @@ -165,7 +165,6 @@ __resh_precmd() { -lcAll "$__RESH_LC_ALL" \ -lines "$__RESH_LINES" \ -login "$__RESH_LOGIN" \ - -path "$__RESH_PATH" \ -pwd "$__RESH_PWD" \ -pwdAfter "$__RESH_PWD_AFTER" \ -shellEnv "$__RESH_SHELL_ENV" \ @@ -193,6 +192,7 @@ __resh_precmd() { -osReleaseName "$__RESH_OS_RELEASE_NAME" \ -osReleasePrettyName "$__RESH_OS_RELEASE_PRETTY_NAME" \ &>~/.resh/client_last_run_out.txt || echo "resh ERROR: $(head -n 1 ~/.resh/client_last_run_out.txt)" + # -path "$__RESH_PATH" \ fi unset __RESH_COLLECT } diff --git a/version b/version index 3eefcb9..9084fa2 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.0.0 +1.1.0