Skip to content

Commit

Permalink
feat: Get Atuin from bluefin-cli (ublue-os#895)
Browse files Browse the repository at this point in the history
  • Loading branch information
m2Giles authored and wizzywizard65 committed Feb 12, 2024
1 parent 97d1e0a commit a39e077
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down
15 changes: 15 additions & 0 deletions just/custom.just
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a39e077

Please sign in to comment.