Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / lib / site_perl / 5.8.0 / Psh / Builtins / Hash.pm
CommitLineData
86530b38
AT
1package Psh::Builtins::Hash;
2
3require Psh::Util;
4
5=item * C<hash>
6
7Shows information about Psh's executable and path hashes.
8
9=item * C<hash -r>
10
11Empties the path and executable hashes. This might be necessary if
12executables are renamed/removed/added while you're logged in.
13
14=cut
15
16
17sub bi_hash {
18 my @words=@{$_[1]};
19
20 if (@words) {
21 while (my $sub= shift @words) {
22 if (substr($sub,0,1) eq '-') {
23 if ($sub eq '-r') {
24 %Psh::Util::command_hash=();
25 %Psh::Util::path_hash=();
26 } else {
27 Psh::Util::print_out("Unknown option $sub.\n");
28 }
29 } else {
30 }
31 }
32 }
33 else {
34 while (my ($key,$val)= each %Psh::Util::command_hash) {
35 Psh::Util::print_out("$key=$val\n");
36 }
37 while (my ($key,$val)= each %Psh::Util::path_hash) {
38 Psh::Util::print_out("$key=$val\n");
39 }
40 }
41 return (1,undef);
42}
43
441;