# Test if PS1 is set to the upstream default value, and if so overwrite it with our default.
# This allows users to override $PS1 by passing it to the invocation of zsh as an environment variable.
# We drop '%m' (hostname) from the default PS1 as it isn't meaningful on Termux/Android.
[[ "$PS1" == '%m%# ' ]] && PS1='%# '

# Handles nonexistent commands.
# If user has entered command which invokes non-available
# utility, command-not-found will give a package suggestions.
if [ -x "/data/data/com.termux/files/usr/libexec/termux/command-not-found" ]; then
	command_not_found_handler() {
		"/data/data/com.termux/files/usr"/libexec/termux/command-not-found "$1"
	}
fi

# Load and initialize the completions system.
autoload -U compinit
compinit

# vim: set noet ft=zsh tw=4 sw=4 ff=unix
