From d91e8c09b60b99115a8216d4bae54d4637cef3f0 Mon Sep 17 00:00:00 2001 From: RevBar Date: Fri, 10 Jun 2011 01:04:26 +0200 Subject: [PATCH] Prompt decorations --- revbank | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/revbank b/revbank index 65212e9..2342a43 100755 --- a/revbank +++ b/revbank @@ -50,7 +50,7 @@ print "\e[0m\n\n\nWelcome to the RevBank Shell"; my $at = "ABORTING TRANSACTION."; my $readline = Term::ReadLine->new($0); -$readline->ornaments(0); +$readline->ornaments('me,md,,'); # For tab completion my @commands = qw/ @@ -68,13 +68,14 @@ sub prompt { @matches = grep /^\Q$word\E/i, @$completions if $state == 0; return shift @matches; }; - my $input = $readline->readline($prompt. "\e[1;4m"); + my $input = $readline->readline($prompt); + logline($prompt); logline(defined($input) ? $input : "\e[1;5mX\e[0m"); + logline("\n"); print "\e[0m"; defined $input or return; - chomp $input; # Clean up backspaces... TODO: fix terminal :) $input =~ s/^\cH+//;