From 2a1b4b50b4c948e3234b9e985abc43f68fb6ddbf Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Mon, 29 May 2023 10:07:39 +0200 Subject: T5234: add bash prompt identifier for given Network Namespace --- src/cstore/cstore.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cstore/cstore.cpp b/src/cstore/cstore.cpp index 7af50f5..c7870a2 100644 --- a/src/cstore/cstore.cpp +++ b/src/cstore/cstore.cpp @@ -3080,8 +3080,8 @@ Cstore::get_shell_prompt(const string& level) if (lvl.length() > 0) { lvl = " " + lvl; } - // show VRF name on prompt and add : if VRF name is not none - return ("[edit" + lvl + "]\\n\\u@\\H${VRF:+:$VRF}# "); + // show VRF and Network Namespace name on console + return ("[edit" + lvl + "]\\n\\u@\\H${VRF:+(vrf:$VRF)}${NETNS:+(ns:$NETNS)}# "); } // escape the single quotes in the string for shell -- cgit v1.2.3