From db8f621abf85484b028b3f61182c206a6d962899 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lesimple?= Date: Wed, 15 Sep 2021 13:42:19 +0000 Subject: [PATCH] doc: add help about the interactive builtin commands (#227) --- lib/perl/OVH/Bastion/interactive.inc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/perl/OVH/Bastion/interactive.inc b/lib/perl/OVH/Bastion/interactive.inc index 8ff1e83..373841b 100644 --- a/lib/perl/OVH/Bastion/interactive.inc +++ b/lib/perl/OVH/Bastion/interactive.inc @@ -223,6 +223,18 @@ EOM } else { system($0, '-c', "$realOptions --osh $line"); + + # in addition to the normal help, also advertise the interactive mode builtin commands: + if ($line eq 'help') { + + osh_info("Under interactive mode, additional builtin commands are supported:\n" + . "- ssh [options] Connect to remote server, note that all the standard options\n" + . " can be used (--port, etc.), refer to --long-help for a list.\n" + . "- mfa Request an immediate MFA validation to elevate the current session,\n" + . " to avoid getting a prompt for each JIT MFA-required command.\n" + . "- nomfa Go back non-MFA elevated session.\n" + . "- exit Quit the interactive mode, 'quit' and ^D can be used instead.\n"); + } } }