Commit Graph

6 Commits

Author SHA1 Message Date
Oliver Schmidhauser d3cfccddbe have zsh run profile too, so services would get executed 2019-07-27 12:01:50 +02:00
Fredrik Fornwall 6fda59ce2b zsh: Simplify command_not_found_handler()
See https://github.com/termux/termux-packages/issues/2655#issuecomment-405100634
2018-07-15 18:44:43 +02:00
Fredrik Fornwall a0a6d2d46d zsh: Exit with error in command_not_found_handler
Fixes #2655.
2018-07-15 17:50:13 +02:00
Tom Yan 5d3ef9ba0c make PS1 dynamic and shell-specific
PS1 is not supposed to be an environment variable (i.e. will not
be listed in `printenv` but only in `set`). Its value should also
be shell-specific.

With this commit we can stop exporting a static PS1 as env var on
the java side.

The prompt would now indicate whether the current user is root.
2018-06-22 01:11:37 +02:00
Fredrik Fornwall 8927f8fbc6 zsh: Return 0 from command_not_found_handler
"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.
2016-11-28 07:28:06 -05:00
Fredrik Fornwall 3cc4ef712e Enable command-not-found for bash and zsh interactive shells 2015-07-13 19:41:08 -04:00