diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-12-27 14:11:05 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-12-27 14:11:05 +1300 |
commit | e3f9f89282434afdff95f4804cb63ebc66003ebf (patch) | |
tree | 088240f167d969ec69c17413fd49e2e7abe1ca87 | |
parent | Add an issue (diff) | |
download | dotfiles-e3f9f89282434afdff95f4804cb63ebc66003ebf.tar.gz dotfiles-e3f9f89282434afdff95f4804cb63ebc66003ebf.zip |
Fix an issue
End the prompt subshell with a : to reset $?
-rw-r--r-- | ISSUES.markdown | 2 | ||||
-rw-r--r-- | ksh/kshrc.d/prompt.ksh | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/ISSUES.markdown b/ISSUES.markdown index 1e766a6e..5d9d43d3 100644 --- a/ISSUES.markdown +++ b/ISSUES.markdown @@ -24,5 +24,3 @@ Known issues jobspecs around that flee after a jobs builtin run; only saw this manifest after 90dcadf; either I understand job specs really poorly or this may be a bug in bash -* Pressing Enter after an empty first line in ksh93 sets $? to 1; a bit - annoying. Maybe check history number somehow? diff --git a/ksh/kshrc.d/prompt.ksh b/ksh/kshrc.d/prompt.ksh index e082d600..904b64ef 100644 --- a/ksh/kshrc.d/prompt.ksh +++ b/ksh/kshrc.d/prompt.ksh @@ -20,7 +20,7 @@ function prompt { # Add sub-commands; working directory with ~ abbreviation, VCS, job # count, and previous command return value - PS1=$PS1'$(ret=$?;jobc=$(jobs -p|sed -n \$=);prompt pwd;prompt vcs;prompt job;prompt ret)' + PS1=$PS1'$(ret=$?;jobc=$(jobs -p|sed -n \$=);prompt pwd;prompt vcs;prompt job;prompt ret;:)' # Add prefix and suffix PS1='${PROMPT_PREFIX}'$PS1'${PROMPT_SUFFIX}' |