diff options
author | Christian Breunig <christian@breunig.cc> | 2023-05-21 23:09:25 +0200 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2023-05-21 23:09:25 +0200 |
commit | bc9434237bc38a966f4b67ad2d9cf629886bc074 (patch) | |
tree | 89ef6f63a6b6ccb0ae2da40f047a9798f011d405 /src/cstore | |
parent | 05194c01ee45d32289d3f071605877eedb1165c4 (diff) | |
download | vyatta-cfg-bc9434237bc38a966f4b67ad2d9cf629886bc074.tar.gz vyatta-cfg-bc9434237bc38a966f4b67ad2d9cf629886bc074.zip |
T5234: add bash prompt identifier for given VRF instance
Diffstat (limited to 'src/cstore')
-rw-r--r-- | src/cstore/cstore.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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 |