Skip to content

Commit

Permalink
Add atuin
Browse files Browse the repository at this point in the history
  • Loading branch information
evanpurkhiser committed Aug 13, 2023
1 parent d9b1d0f commit bf41bd0
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
18 changes: 18 additions & 0 deletions base/atuin/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# possible values: auto, full, compact
style = "compact"

# date format used, either "us" or "uk"
dialect = "us"

# address of the sync server
sync_address = "https://atuin.evanpurkhiser.com"

# enable or disable automatic sync
auto_sync = true

# how often to sync history. note that this is only triggered when a command is
# ran, so sync intervals may well be longer. set it to 0 to sync each command
sync_frequency = "5m"

# enable or disable automatic update checks
update_check = false
6 changes: 6 additions & 0 deletions base/bash/bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ fi
# Setup direnv if available
hash direnv 2>/dev/null && eval "$(direnv hook bash)"

# Setup atuin for bash history.
#
# NOTE: It's important this comes after any other PROMPT_COMMAND updates
source "$XDG_CONFIG_HOME/bash/bash-preexec"
eval "$(atuin init bash)"

# Cache sudo password immeidately when using SSH with pam_ssh_agent
[ "$SSH_CLIENT" ] &&
grep --quiet 'pam_ssh_agent' /etc/pam.d/sudo &&
Expand Down
7 changes: 7 additions & 0 deletions base/bash/ensure-setup
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,10 @@
# not have any required setup

export BASHRC_NOT_READY=0

# Ensure bash-preexec. Needed for atuin
if [ ! -f "$XDG_CONFIG_HOME/bash/bash-preexec" ]; then
curl \
-s https://raw.githubusercontent.com/rcaloras/bash-preexec/master/bash-preexec.sh \
-o "$XDG_CONFIG_HOME/bash/bash-preexec"
fi
1 change: 1 addition & 0 deletions common/platform-osx/macos/Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ cask "1password-cli"
cask "obsidian"

# Basic terminal stuff
brew "atuin"
brew "bash"
brew "bash-completion@2"
brew "coreutils"
Expand Down

0 comments on commit bf41bd0

Please sign in to comment.