Skip to content

Commit 5867ce1

Browse files
committed
Fix
1 parent 9781b1a commit 5867ce1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/core/builtins/type_.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,10 @@ fn type_p_sub(core: &mut ShellCore, com: &String) -> i32 {
120120
}
121121

122122
if let Ok(path) = core.db.get_elem("BASH_CMDS", &com) {
123-
println!("{}", &path);
124-
return 0;
123+
if ! path.is_empty() {
124+
println!("{}", &path);
125+
return 0;
126+
}
125127
}
126128

127129
if let Some(path) = file::search_command(com) {

0 commit comments

Comments
 (0)