mirror of
https://github.com/sadan4/dotfiles.git
synced 2025-02-23 00:29:01 -05:00
add http2ssh command
This commit is contained in:
parent
7ba0224f6c
commit
ce703fa142
1 changed files with 14 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue