1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-27 13:44:32 +03:00

Merge remote-tracking branch 'occivink/alt-fail'

This commit is contained in:
Maxime Coste 2019-10-09 19:18:45 +11:00
commit e4f815e350
4 changed files with 12 additions and 12 deletions

View File

@ -428,11 +428,11 @@ define-command -hidden c-family-alternative-file %{
done
;;
*)
echo "echo -markup '{Error}extension not recognized'"
echo "fail 'extension not recognized'"
exit
;;
esac
echo "echo -markup '{Error}alternative file not found'"
echo "fail 'alternative file not found'"
}
}

View File

@ -54,7 +54,7 @@ define-command lua-alternative-file -docstring 'Jump to the alternate file (impl
case $kak_buffile in
*spec/*_spec.lua)
altfile=$(eval printf %s\\n $(printf %s\\n $kak_buffile | sed s+spec/+'*'/+';'s/_spec//))
[ ! -f $altfile ] && echo "echo -markup '{Error}implementation file not found'" && exit
[ ! -f $altfile ] && echo "fail 'implementation file not found'" && exit
;;
*.lua)
path=$kak_buffile
@ -66,10 +66,10 @@ define-command lua-alternative-file -docstring 'Jump to the alternate file (impl
break
fi
done
[ ! -d $altdir ] && echo "echo -markup '{Error}spec/ not found'" && exit
[ ! -d $altdir ] && echo "fail 'spec/ not found'" && exit
;;
*)
echo "echo -markup '{Error}alternative file not found'" && exit
echo "fail 'alternative file not found'" && exit
;;
esac
printf %s\\n "edit $altfile"

View File

@ -56,7 +56,7 @@ define-command moon-alternative-file -docstring 'Jump to the alternate file (imp
case $kak_buffile in
*spec/*_spec.moon)
altfile=$(eval printf %s\\n $(printf %s\\n $kak_buffile | sed s+spec/+'*'/+';'s/_spec//))
[ ! -f $altfile ] && echo "echo -markup '{Error}implementation file not found'" && exit
[ ! -f $altfile ] && echo "fail 'implementation file not found'" && exit
;;
*.moon)
path=$kak_buffile
@ -68,10 +68,10 @@ define-command moon-alternative-file -docstring 'Jump to the alternate file (imp
break
fi
done
[ ! -d $altdir ] && echo "echo -markup '{Error}spec/ not found'" && exit
[ ! -d $altdir ] && echo "fail 'spec/ not found'" && exit
;;
*)
echo "echo -markup '{Error}alternative file not found'" && exit
echo "fail 'alternative file not found'" && exit
;;
esac
printf %s\\n "edit $altfile"

View File

@ -102,11 +102,11 @@ define-command ruby-alternative-file -docstring 'Jump to the alternate file (imp
case $kak_buffile in
*spec/*_spec.rb)
altfile=$(eval echo $(echo $kak_buffile | sed s+spec/+'*'/+';'s/_spec//))
[ ! -f $altfile ] && echo "echo -markup '{Error}implementation file not found'" && exit
[ ! -f $altfile ] && echo "fail 'implementation file not found'" && exit
;;
*test/*_test.rb)
altfile=$(eval echo $(echo $kak_buffile | sed s+test/+'*'/+';'s/_test//))
[ ! -f $altfile ] && echo "echo -markup '{Error}implementation file not found'" && exit
[ ! -f $altfile ] && echo "fail 'implementation file not found'" && exit
;;
*.rb)
path=$kak_buffile
@ -119,10 +119,10 @@ define-command ruby-alternative-file -docstring 'Jump to the alternate file (imp
break
fi
done
[ ! -d $altdir ] && echo "echo -markup '{Error}spec/ and test/ not found'" && exit
[ ! -d $altdir ] && echo "fail 'spec/ and test/ not found'" && exit
;;
*)
echo "echo -markup '{Error}alternative file not found'" && exit
echo "fail 'alternative file not found'" && exit
;;
esac
echo "edit $altfile"