Dotfiles/.local/bin/nvim-gitdev.sh
2025-03-06 01:05:15 +01:00

5 lines
202 B
Bash
Executable file

#!/bin/sh
function urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
git_url=$(urldecode $1)
# Strip 'git-dev://open/?repo='
zsh -c "nvim -c \"GitDevOpen ${git_url/nvim-gitdev:\/\/open\/?repo=/}\""