chiark / gitweb /
zsh: Return 0 from command_not_found_handler
authorFredrik Fornwall <fredrik@fornwall.net>
Mon, 28 Nov 2016 12:28:06 +0000 (07:28 -0500)
committerFredrik Fornwall <fredrik@fornwall.net>
Mon, 28 Nov 2016 12:28:06 +0000 (07:28 -0500)
"The function should return status zero if it successfully handled
the command, or non-zero status if it failed. In the latter case
the standard handling is applied: ‘command not found’ is printed
to standard error and the shell exits with status 127."
- http://zsh.sourceforge.net/Doc/Release/Command-Execution.html

Needed after changes in
https://github.com/termux/termux-packages/pull/566
where the command-not-found program no longer exists itself with 0.

packages/zsh/build.sh
packages/zsh/etc-zshrc

index 4d036b385ced57971e70a636aa7587e633e5a502..1d4014a852957a00ea4a91773133f426813a180c 100644 (file)
@@ -1,9 +1,9 @@
-TERMUX_PKG_HOMEPAGE=http://zsh.sourceforge.net/
+TERMUX_PKG_HOMEPAGE=https://www.zsh.org
 TERMUX_PKG_DESCRIPTION="Shell designed for interactive use, although it is also a powerful scripting language"
 _FOLDERVERSION=5.2
 TERMUX_PKG_VERSION=${_FOLDERVERSION}.0
-TERMUX_PKG_BUILD_REVISION=4
-TERMUX_PKG_SRCURL=http://downloads.sourceforge.net/project/zsh/zsh/$_FOLDERVERSION/zsh-${_FOLDERVERSION}.tar.xz
+TERMUX_PKG_BUILD_REVISION=5
+TERMUX_PKG_SRCURL=https://downloads.sourceforge.net/project/zsh/zsh/$_FOLDERVERSION/zsh-${_FOLDERVERSION}.tar.xz
 TERMUX_PKG_RM_AFTER_INSTALL="bin/zsh-${_FOLDERVERSION}"
 TERMUX_PKG_DEPENDS="libandroid-support, ncurses, termux-tools, command-not-found"
 TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--enable-etcdir=$TERMUX_PREFIX/etc --disable-gdbm --disable-pcre ac_cv_header_utmp_h=no"
index 4d78a6ec72f16225f08a6e47372f2e0d18c73266..c384e3896b33ea96152666c1ab5a55851e19f790 100644 (file)
@@ -1,3 +1,4 @@
 command_not_found_handler() {
        @TERMUX_PREFIX@/libexec/termux/command-not-found $1
+       return 0
 }