mirror of
https://github.com/sadan4/dotfiles.git
synced 2025-06-24 21:27:01 -04:00
add clone repo commannd
This commit is contained in:
parent
68309aa023
commit
99714482de
2 changed files with 123 additions and 4 deletions
|
@ -45,12 +45,16 @@ in
|
|||
(mkScript {
|
||||
name = "http2ssh";
|
||||
file = ./http2ssh.sh;
|
||||
env = [ pkgs.git ];
|
||||
env = with pkgs; [
|
||||
git
|
||||
];
|
||||
})
|
||||
(mkScript {
|
||||
name = "git_fetchAll";
|
||||
file = ./git_fetchAll.sh;
|
||||
env = [ pkgs.git ];
|
||||
env = with pkgs; [
|
||||
git
|
||||
];
|
||||
})
|
||||
(mkScript {
|
||||
name = "install_eslint";
|
||||
|
@ -59,7 +63,9 @@ in
|
|||
(mkScript {
|
||||
name = "math";
|
||||
file = ./math.sh;
|
||||
env = [ pkgs.python3 ];
|
||||
env = with pkgs; [
|
||||
python3
|
||||
];
|
||||
})
|
||||
(mkScript {
|
||||
name = "hashi18n";
|
||||
|
@ -68,8 +74,11 @@ in
|
|||
(mkScript {
|
||||
name = "flakeify";
|
||||
file = ./flakeify.sh;
|
||||
env = [ pkgs.direnv ];
|
||||
env = with pkgs; [
|
||||
direnv
|
||||
];
|
||||
})
|
||||
# impl for the cloneRepo command
|
||||
];
|
||||
file = {
|
||||
scripts = {
|
||||
|
@ -87,4 +96,30 @@ in
|
|||
p = "${builtins.readFile ./projectPicker.sh}";
|
||||
};
|
||||
};
|
||||
programs = {
|
||||
zsh = {
|
||||
initExtra =
|
||||
let
|
||||
implName = "cloneRepoImpl";
|
||||
in
|
||||
''
|
||||
cloneRepo() {
|
||||
local dir;
|
||||
dir=$(${
|
||||
(mkScript {
|
||||
name = implName;
|
||||
file = ./cloneRepoImpl.sh;
|
||||
env = with pkgs; [
|
||||
gh
|
||||
fzf
|
||||
];
|
||||
})
|
||||
}/bin/${implName})
|
||||
if [[ $? -eq 0 ]]; then
|
||||
cd ''${dir}
|
||||
fi
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue