#!/bin/bash _ariketa.dir () { local _ariketa_filename _ariketa_dir _ariketa_filename="${BASH_SOURCE[$(( ${#BASH_SOURCE[@]} - 1 ))]}" [[ "$_ariketa_filename" == */* ]] && _ariketa_dir="${_ariketa_filename%/*}" # get an absolute path to ariketa in case we need it _ariketa_dir=$(cd "${_ariketa_dir:-$PWD}" && printf "%s" "$PWD") printf "%s" "$_ariketa_dir" } _ariketa.help () { >&2 printf "%s\n" "$(&2 printf "** %s\n" \ "" ""\ "$(declare -p _examples)"\ "_examples array needs content -- see 'configuration' below"\ "" "" _ariketa.help return $? } # preserve multiline commands as such in history shopt -s lithist # load presentation prompt source "${ARIKETA_DIR:?}/lib/prompt.sh" # load misc functions source "${ARIKETA_DIR:?}/lib/functions.sh" # set up bash macros to page through examples source "${ARIKETA_DIR:?}/lib/bindings.sh" # unset example index/directionality markers unset _I _D