diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-19 14:40:37 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-19 14:40:37 +0200 |
commit | c1f8a414ad01c4c2863ebef3b81d79f3c40b2da5 (patch) | |
tree | 4b166b7df87a7a896fcd78637828ed46e38b8566 /src/m_prompt.c | |
parent | Ready to merge (diff) | |
download | 42-minishell-c1f8a414ad01c4c2863ebef3b81d79f3c40b2da5.tar.gz 42-minishell-c1f8a414ad01c4c2863ebef3b81d79f3c40b2da5.tar.bz2 42-minishell-c1f8a414ad01c4c2863ebef3b81d79f3c40b2da5.tar.xz 42-minishell-c1f8a414ad01c4c2863ebef3b81d79f3c40b2da5.tar.zst 42-minishell-c1f8a414ad01c4c2863ebef3b81d79f3c40b2da5.zip |
Added retval as an option for the prompt with \?
Diffstat (limited to 'src/m_prompt.c')
-rw-r--r-- | src/m_prompt.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/m_prompt.c b/src/m_prompt.c index 5278c42..a7c257d 100644 --- a/src/m_prompt.c +++ b/src/m_prompt.c @@ -79,6 +79,11 @@ static char ft_strsubst_s(var, "\\v", FT_MSH_VERSION); else if (var[i + 1] == 's') ft_strsubst_s(var, "\\s", FT_PROGNAME); + else if (var[i + 1] == '?') + { + ft_uitoa_s(tmp, msh->ret); + ft_strsubst_s(var, "\\?", tmp); + } } i++; } |