1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-18 17:02:06 +03:00

kakrc: avoid bash features

This commit is contained in:
Maxime Coste 2013-03-22 13:45:52 +01:00
parent a2476a8fbf
commit 9494fbbd87

View File

@ -1,22 +1,22 @@
def -shell-params runtime %{ %sh{ def -shell-params runtime %{ %sh{
while (( "$#" )); do while [ $# -gt 0 ]; do
echo "source '${kak_runtime}/$1'" echo "source '${kak_runtime}/$1'"
shift shift
done done
}} }}
%sh{ %sh{
if [[ -n "${XDG_CONFIG_HOME}" ]]; then if [ -n "${XDG_CONFIG_HOME}" ]; then
localconfdir="${XDG_CONFIG_HOME}/kak" localconfdir="${XDG_CONFIG_HOME}/kak"
else else
localconfdir="$HOME/.config/kak" localconfdir="$HOME/.config/kak"
fi fi
if [[ -d "${localconfdir}/autoload" ]]; then if [ -d "${localconfdir}/autoload" ]; then
for rcfile in ${localconfdir}/autoload/*; do for rcfile in ${localconfdir}/autoload/*; do
echo "try %{ source '${rcfile}' } catch %{ }"; echo "try %{ source '${rcfile}' } catch %{ }";
done done
fi fi
if [[ -f "${localconfdir}/kakrc" ]]; then if [ -f "${localconfdir}/kakrc" ]; then
echo "source '${localconfdir}/kakrc'" echo "source '${localconfdir}/kakrc'"
fi fi
} }