From c1f8a414ad01c4c2863ebef3b81d79f3c40b2da5 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sat, 19 Sep 2020 14:40:37 +0200 Subject: Added retval as an option for the prompt with \? --- src/m_prompt.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/m_prompt.c') 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++; } -- cgit v1.2.3