summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-05-29 10:07:39 +0200
committerChristian Breunig <christian@breunig.cc>2023-05-29 10:07:39 +0200
commit2a1b4b50b4c948e3234b9e985abc43f68fb6ddbf (patch)
tree5d2d924a50d9abc39997ee0d3cd50b450fc9bd40
parentbc9434237bc38a966f4b67ad2d9cf629886bc074 (diff)
downloadvyatta-cfg-2a1b4b50b4c948e3234b9e985abc43f68fb6ddbf.tar.gz
vyatta-cfg-2a1b4b50b4c948e3234b9e985abc43f68fb6ddbf.zip
T5234: add bash prompt identifier for given Network Namespace
-rw-r--r--src/cstore/cstore.cpp4
1 files 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