From bc9434237bc38a966f4b67ad2d9cf629886bc074 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sun, 21 May 2023 23:09:25 +0200 Subject: T5234: add bash prompt identifier for given VRF instance --- src/cstore/cstore.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/cstore/cstore.cpp b/src/cstore/cstore.cpp index 4f19ebf..7af50f5 100644 --- a/src/cstore/cstore.cpp +++ b/src/cstore/cstore.cpp @@ -3080,7 +3080,8 @@ Cstore::get_shell_prompt(const string& level) if (lvl.length() > 0) { lvl = " " + lvl; } - return ("[edit" + lvl + "]\\n\\u@\\H# "); + // show VRF name on prompt and add : if VRF name is not none + return ("[edit" + lvl + "]\\n\\u@\\H${VRF:+:$VRF}# "); } // escape the single quotes in the string for shell -- cgit v1.2.3