add http2ssh command

This commit is contained in:
sadan 2024-06-19 02:37:19 -04:00
parent 7ba0224f6c
commit ce703fa142
No known key found for this signature in database

View file

@ -102,6 +102,20 @@ in
wslclip -g && exit 0
fi
'')
(pkgs.writeShellScriptBin "http2ssh" ''
set -euo pipefail
if [[ -z $1 ]]; then
echo "You need to provide a remote name";
echo "Avilable remotes";
git remote -v;
exit 1;
fi
URL=''$(git remote get-url $1);
URL=''${URL/https:\/\//git@};
URL=''${URL/\//:};
''
)
(pkgs.writeShellScriptBin "copy" ''
command -v xsel > /dev/null
if [[ $? -eq 0 ]]; then