diff --git a/Containerfile b/Containerfile index a95b44c7534..664eda04fba 100644 --- a/Containerfile +++ b/Containerfile @@ -75,6 +75,10 @@ RUN curl -Lo /tmp/starship.tar.gz "https://github.com/starship/starship/releases install -c -m 0755 /tmp/starship /usr/bin && \ echo 'eval "$(starship init bash)"' >> /etc/bashrc +# Copy atuin from bluefin-cli +COPY --from=ghcr.io/ublue-os/bluefin-cli /usr/bin/atuin /usr/bin/atuin +COPY --from=ghcr.io/ublue-os/bluefin-cli /usr/share/bash-prexec /usr/share/bash-prexec + RUN wget https://copr.fedorainfracloud.org/coprs/ublue-os/staging/repo/fedora-"${FEDORA_MAJOR_VERSION}"/ublue-os-staging-fedora-"${FEDORA_MAJOR_VERSION}".repo -O /etc/yum.repos.d/ublue-os-staging-fedora-"${FEDORA_MAJOR_VERSION}".repo && \ /tmp/build.sh && \ /tmp/image-info.sh && \ diff --git a/just/custom.just b/just/custom.just index 8a57bfaa97f..792961c9d05 100644 --- a/just/custom.just +++ b/just/custom.just @@ -243,3 +243,18 @@ dx-group: sudo usermod -aG lxd $USER sudo usermod -aG libvirt $USER @echo "Logout to use docker, incus-admin, lxd, libvirt" + +# Add atuin +atuin: + #!/usr/bin/bash + shell=$(basename $SHELL) + if test $shell = "fish"; then + echo "Adding atuin to your config.fish" + printf '\nif status is-interactive\n atuin init fish | source\nend\n' >> ${XDG_CONFIG_HOME:-$HOME/.config}/fish/config.fish + elif test $shell = "zsh"; then + echo "Adding atuin to your .zshrc" + printf '\neval "$(atuin init zsh)"\n' >> ${ZDOTDIR:-$HOME}/.zshrc + elif test $shell = "bash"; then + echo "Adding bash-prexec and atuin to your .bashrc" + printf '\n[[ -f /usr/share/bash-prexec ]] && source /usr/share/bash-prexec\neval "$(atuin init bash)"\n' >> ~/.bashrc + fi