myhome/.local/bin/debugger
Marcin Woźniak 4b8de442ab
Added debugger into neovim
Signed-off-by: Marcin Woźniak <y0rune@aol.com>
2021-05-19 00:22:23 +02:00

13 lines
325 B
Bash
Executable File

#!/bin/bash
FILE="$(readlink -f "$(echo "$*" | cut -d' ' -f2)" 2>/dev/null)"
if [ -f "$FILE" ] ; then
case "$FILE" in
*.py) python3 -m pdb "$FILE" ;;
*.sh) /bin/bash -ex "$FILE" ;;
*) printf "File \"%s\" not debugger found.\\n" "$FILE"
esac
printf "File \"%s\" not found.\\n" "$FILE"
fi