Added commandline tools
This commit is contained in:
25
home/shell/rip.nix
Normal file
25
home/shell/rip.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
rm-improved
|
||||
];
|
||||
|
||||
# TODO: Replace this with confirm once packaged
|
||||
home.shellAliases = {
|
||||
confirm = ''
|
||||
read -p "Are you sure? [y/N] " -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||
then
|
||||
$argv
|
||||
fi
|
||||
'';
|
||||
|
||||
rm = ''
|
||||
confirm rm $argv
|
||||
'';
|
||||
|
||||
rmdir = ''
|
||||
confirm rmdir $argv
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user