+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
+ echo "Theme settings have been reset."
+ return 0
+ fi
+
+ if [ -r "$1" ]; then
+ theme="$1"
+ elif [ -r "$AXZSH/custom_themes/$1.axzshtheme" ]; then
+ theme="$AXZSH/custom_themes/$1.axzshtheme"
+ elif [ -r "$AXZSH/themes/$1.axzshtheme" ]; then
+ theme="$AXZSH/themes/$1.axzshtheme"
+ else
+ echo "Theme \"$1\" not found!"
+ return 1
+ fi
+ ln -sv "$theme" "$link_name" || return 1
+ return $?
+}
+