cli icon indicating copy to clipboard operation
cli copied to clipboard

Dynamically change menu prompt

Open stephb9959 opened this issue 1 year ago • 0 comments

Hi,

I am looking for a way to change the menu prompt dynamically during the use of the CLI. This is to mimic the behavior of CLIs by companies like Cisco/Juniper/etc. In those CLIs, when you enter a menu, you can select a device identifier for example, and the menu prompt now changes to include the device identifier. That signifies to the user that you have chosen a specific device to work with.

Here is an example:

cli> modify 11:22:33:44:55:66
modify 11:22:33:44:55:66> set name router1
modify 11:22:33:44:55:66> set DNS 8.8.8.8
modify 11:22:33:44:55:66> save
cli> 

I hope that this helps.

Thank you.

stephb9959 avatar Apr 04 '23 20:04 stephb9959