From d7538473c82ce4a083cfd75050ba749dee46fbda Mon Sep 17 00:00:00 2001 From: Mo8it Date: Tue, 19 Jul 2022 15:30:27 +0200 Subject: [PATCH] Add podman-default-create --- .config/fish/config.fish | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.config/fish/config.fish b/.config/fish/config.fish index 925a5b4..938e1b9 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -1,6 +1,23 @@ # Environment variables set -p PATH "$HOME/.cargo/bin" +# Non interactive functions +function podman-default-create -w podman + podman create \ + --name $argv[1] \ + --detach \ + --pull always \ + --label "io.containers.autoupdate=registry" \ + $argv[2..] + + set -l old_pwd (pwd) + cd ~/.config/systemd/user + podman generate systemd --new --files --name $argv[1] + cd $old_pwd + + systemctl --user enable --now container-$argv[1] +end + if status is-interactive # Interactive environment variables set -x EDITOR /usr/bin/nvim