ax_common="${dir}/lib/ax/ax-common.sh"
[[ -r "$ax_common" ]] && source "$ax_common"
done
-if [[ -z "$ax_common_sourced" || axzsh_is_dumb_terminal ]]; then
+if [[ -z "$ax_common_sourced" ]]; then
function ax_msg {
shift
echo "$@"
function SetTheme {
local link_name="$AXZSH/active_theme"
- if [ $# -ne 1 ]; then
- echo "Usage: axzsh_set_theme <name|->"
- return 1
- fi
-
- rm -f "$link_name" || return 1
-
if [ "$1" = "-" ]; then
+ rm -f "$link_name" || return 1
echo "Theme settings have been reset."
return 0
fi
else
# Look for theme inside of installed plugins:
for dname (
+ "$AXZSH/custom_themes"
"$AXZSH/custom_plugins/"*(N)
"$AXZSH/repos/"*(N)
); do
return 1
fi
fi
- ln -sv "$theme" "$link_name" || return 1
+ ln -fsv "$theme" "$link_name" || return 1
return $?
}
;;
"enable-default-plugins")
[[ $# -eq 0 ]] || Usage
- EnableDefaultPlugins
- UpdatePluginCache
+ EnableDefaultPlugins && UpdatePluginCache
;;
"check-plugins")
[[ $# -eq 0 ]] || Usage
;;
"set-theme")
[[ $# -eq 1 ]] || Usage
- SetTheme "$1"
- UpdatePluginCache
+ SetTheme "$1" && UpdatePluginCache
;;
"upgrade")
[[ $# -eq 0 ]] || Usage