package Psh
::Builtins
::Option
;
Lists the current configuration options
=item * C<option NAME=VALUE>
Prints the value of an option
my @opts= Psh
::Options
::list_options
();
foreach my $opt (@opts) {
my $val= Psh
::Options
::get_printable_option
($opt);
Psh
::Util
::print_out
("$opt=$val\n");
while (my $tmp= shift @words) {
if (substr($tmp,0,1) eq '-') {
Psh
::Options
::del_option
(substr($tmp,1));
} elsif (substr($tmp,0,1) eq '+') {
Psh
::Options
::set_option
(substr($tmp,1),1);
my ($key,$val)= $tmp=~ /^(.*?)=(.*)$/;
if (!$val or $val eq 'sub') {
my $char= substr($val,0,1);
} elsif ($char ne "'" and $char ne '"' and
$char ne '[' and $char ne '{' and $char ne "\\" and
$char ne '%' and $char ne '$' and $char ne '%' and
my @tmp= Psh
::PerlEval
::protected_eval
($val,'eval');
Psh
::Options
::set_option
($key, $val);
my $val= Psh
::Options
::get_printable_option
($tmp,1);
Psh
::Util
::print_out
("$val\n");