Success() does not give same result as running in terminal

If I run type ls in a bash terminal I get:

ls is aliased to `ls --color=auto’

If I run success(type ls) in Julia I get:

ERROR: could not spawn type ls: no such file or directory (ENOENT)

Am I doing something wrong?

type is a shell built-in so you can’t use it in Julia. Similarly, you can’t use or examine shell aliases either.

2 Likes