fish: lnmv script
This commit is contained in:
parent
21ae8bbbf2
commit
54d835c290
1 changed files with 19 additions and 0 deletions
|
@ -40,5 +40,24 @@ in
|
||||||
builtins.readFile "${inputs.fish_theme}/fish_prompt.fish" + "\n" +
|
builtins.readFile "${inputs.fish_theme}/fish_prompt.fish" + "\n" +
|
||||||
builtins.readFile ../fish/config.fish;
|
builtins.readFile ../fish/config.fish;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
(writeShellApplication {
|
||||||
|
name = "lnmv";
|
||||||
|
runtimeInputs = [ coreutils ];
|
||||||
|
text = ''
|
||||||
|
# This is crude i know, more shell guards and stuff that I'm bad at
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
# lnmv <source> <target>
|
||||||
|
|
||||||
|
data=''${1%/}
|
||||||
|
target=''${2%/}
|
||||||
|
|
||||||
|
mv "$data" "$target"
|
||||||
|
ln -s "$target" "$data"
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue