Maybe fix for macos recording hidden commands with bash

This commit is contained in:
David Dworken 2022-04-18 22:08:48 -07:00
parent 38b91f933c
commit ce0a0742b7

View File

@ -139,7 +139,7 @@ func parseCrossPlatformInt(data string) (int64, error) {
} }
func getLastCommand(history string) (string, error) { func getLastCommand(history string) (string, error) {
return strings.TrimSpace(strings.SplitN(strings.TrimSpace(history), " ", 2)[1]), nil return strings.SplitN(strings.SplitN(strings.TrimSpace(history), " ", 2)[1], " ", 2)[1][1:], nil
} }
func shouldSkipHiddenCommand(historyLine string) (bool, error) { func shouldSkipHiddenCommand(historyLine string) (bool, error) {