From 63aa130e9c6f430c57d087dfc3d810cc38c85fed Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sat, 15 Jul 2023 14:21:41 +0200 Subject: [PATCH] klinfix: restore Ctrl-C to abort current line, use Ctrl-D instead While spending the past couple of weeks actually trying to use the CLI, I realized that it was very confusing to have a different behavior for Ctrl-C than I was used to from regular shells (including the old clish from $OLDJOB). This change drops the Ctrl-C binding, restoring break/abort behavior, and lets Ctrl-D be abort/exit. Pressing Ctrl-D in a sub-context in configure calls exit, when in the top-most configure context we now do an abort and return to admin-exec. To apply the changes the user still has to type 'commit' or 'leave', or tap Ctrl-Z as in the Cisco CLI. Signed-off-by: Joachim Wiberg --- src/klinfix/xml/infix.xml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/klinfix/xml/infix.xml b/src/klinfix/xml/infix.xml index 708fd3c1..58c2163b 100644 --- a/src/klinfix/xml/infix.xml +++ b/src/klinfix/xml/infix.xml @@ -292,32 +292,31 @@ %u@%h:configure> - - + - + replace main - + replace main - - - - replace main - - + + + + replace main + +