Add is_dir check to auto-cd (#1506)

* Add markdown output

* Add is_dir() check
This commit is contained in:
Jonathan Turner 2020-03-20 16:57:36 +13:00 committed by GitHub
parent 1e343ff00c
commit afa963fd50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -640,6 +640,7 @@ async fn process_line(
}) = pipeline.commands.list[0]
{
if dunce::canonicalize(name).is_ok()
&& PathBuf::from(name).is_dir()
&& which::which(name).is_err()
&& args.list.is_empty()
{