package Psh
::Strategy
::Auto_cd
;
If the input line matches the name of a directory then
it will be handled as an implicit cd.
require Psh
::Builtins
::Cd
;
@Psh::Strategy
::Auto_cd
::ISA
=('Psh::Strategy');
sub new
{ Psh
::Strategy
::new
(@_) }
return Psh
::Strategy
::CONSUME_TOKENS
;
return "auto-cd $dir" if -d
$dir;
Psh
::Builtins
::Cd
::bi_cd
($dir);
return qw(perlscript executable);
# Turn on directory completion for first words in line
$Psh::Completion
::complete_first_word_dirs
=1;