#!/usr/bin/env perl

use lib ($ENV{RLWRAP_FILTERDIR} or ".");
use RlwrapFilter;
use strict;


my $filter = new RlwrapFilter;

$filter -> help_text("rlwrap -H history -z censor_passwords sqlplus scott\@<hostname>:1521/ORCL\n"
                     . "This filter removes the password from SQL 'identified by' clauses\n");

$filter -> history_handler(sub { s/(identified\s+by\s+)(\S+)/$1xXxXxXxX/ig; $_});

$filter -> run;
