Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function __cmd.is_callable() {
- local cmd_type=`type -t $1`
- if [[ (-n $1) && (("$cmd_type" == @(builtin|function)) || ("$cmd_type" == @(file|alias) && -x `which $1`)) ]]; then
- echo 'YES we CAN use this command'
- else
- echo 'NO we CAN NOT use this command'
- fi
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement