bash: use command-not-found handler only if it exists

This commit is contained in:
Leonid Pliushch 2019-07-22 02:23:10 +03:00
parent 026ebfd1c1
commit 1e5d50a950

View File

@ -1,5 +1,7 @@
command_not_found_handle() {
@TERMUX_PREFIX@/libexec/termux/command-not-found "$1"
}
if [ -x @TERMUX_PREFIX@/libexec/termux/command-not-found ]; then
command_not_found_handle() {
@TERMUX_PREFIX@/libexec/termux/command-not-found "$1"
}
fi
PS1='\$ '