New git-get implementation
This commit is contained in:
parent
5a8766ddc5
commit
ed082a4237
@ -99,6 +99,20 @@ in {
|
|||||||
|
|
||||||
initExtra = ''
|
initExtra = ''
|
||||||
which apt >/dev/null 2>&1 && plugins=("\$\{(@)plugins:#tmux-my\}")
|
which apt >/dev/null 2>&1 && plugins=("\$\{(@)plugins:#tmux-my\}")
|
||||||
|
|
||||||
|
# git does not support shell aliases as subcommands, but also
|
||||||
|
# there is no way to change the current working directory from
|
||||||
|
# the subprocess. Emulating the required behavior with the wrapper
|
||||||
|
function git {
|
||||||
|
if [[ "$1" = "get" ]]; then
|
||||||
|
REPO=$(echo $2 | sed 's;http.*://;;')
|
||||||
|
REPO=$(echo $REPO | sed 's;\.git$;;')
|
||||||
|
${pkgs.git}/bin/git clone https://$REPO $GOPATH/src/$REPO
|
||||||
|
cd $GOPATH/src/$REPO
|
||||||
|
else
|
||||||
|
${pkgs.git}/bin/git $@
|
||||||
|
fi
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -130,11 +130,6 @@ in {
|
|||||||
|
|
||||||
ghidra
|
ghidra
|
||||||
|
|
||||||
(writeShellScriptBin "git-get" ''
|
|
||||||
REPO=$(echo $1 | sed 's;http.*://;;')
|
|
||||||
${git}/bin/git clone https://$REPO $GOPATH/src/$REPO
|
|
||||||
'')
|
|
||||||
|
|
||||||
(writeShellScriptBin "chromium" ''
|
(writeShellScriptBin "chromium" ''
|
||||||
${chromium}/bin/chromium --force-dark-mode \
|
${chromium}/bin/chromium --force-dark-mode \
|
||||||
--start-maximized \
|
--start-maximized \
|
||||||
|
Loading…
Reference in New Issue
Block a user