package Psh
::Builtins
::Fallback
::Ls
;
Shows the files in the current directory
my $pattern= shift || '*';
my $ps= $Psh::OS
::FILE_SEPARATOR
;
$pattern.=$ps.'*' if( $pattern !~ /\*/ &&
-d Psh
::Util
::abs_path
($pattern));
return $1 if( m
:\Q
$ps\E
([^\Q
$ps\E
]+)$:); $_
} Psh
::OS
::glob($pattern);
Psh
::Util
::print_list
(sort @files);