rust repl

This commit is contained in:
RingOfStorms (Josh) 2024-06-27 12:22:10 -05:00
parent 7477a7bd93
commit 049344ba97
3 changed files with 22 additions and 1 deletions

View file

@ -107,7 +107,7 @@ in
rgf = "rg --files 2>/dev/null | rg";
# Neofetch is dead
neo = "fastfetch";
neofetch = "fastfetch";
# Nix deprecations
nix-hash = "echo 'The functionality of nix-hash may be covered by various subcommands or options in the new `nix` command.'";

View file

@ -108,3 +108,17 @@ checkout () {
from_master () {
git checkout $(getdefault) $@
}
# nix
nixpkg () {
if [ $# -eq 0 ]; then
echo "Error: No arguments provided. Please specify at least one package."
return 1
fi
cmd="nix shell"
for pkg in "$@"; do
cmd="$cmd \"nixpkgs#$pkg\""
done
eval $cmd
}