From 9494fbbd87eb9601bd9a82940c84995d17de1a6a Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 22 Mar 2013 13:45:52 +0100 Subject: [PATCH] kakrc: avoid bash features --- src/kakrc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/kakrc b/src/kakrc index e61ab85ad..c39e49bc3 100644 --- a/src/kakrc +++ b/src/kakrc @@ -1,22 +1,22 @@ def -shell-params runtime %{ %sh{ - while (( "$#" )); do + while [ $# -gt 0 ]; do echo "source '${kak_runtime}/$1'" shift done }} %sh{ - if [[ -n "${XDG_CONFIG_HOME}" ]]; then + if [ -n "${XDG_CONFIG_HOME}" ]; then localconfdir="${XDG_CONFIG_HOME}/kak" else localconfdir="$HOME/.config/kak" fi - if [[ -d "${localconfdir}/autoload" ]]; then + if [ -d "${localconfdir}/autoload" ]; then for rcfile in ${localconfdir}/autoload/*; do echo "try %{ source '${rcfile}' } catch %{ }"; done fi - if [[ -f "${localconfdir}/kakrc" ]]; then + if [ -f "${localconfdir}/kakrc" ]; then echo "source '${localconfdir}/kakrc'" fi }