Hi
i am running into this error
atuin history list
Error: pool timed out while waiting for an open connection
Location:
/home/rmondal/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/atuin-18.8.0/src/command/client/history.rs:673:18
Error: pool timed out while waiting for an open connection
Location:
/home/rmondal/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/atuin-18.8.0/src/command/client/history.rs:673:18
doctor output
Atuin Doctor
Checking for diagnostics
Please include the output below with any bug reports or issues
{
"atuin": {
"version": "18.8.0",
"sync": null,
"sqlite_version": "3.46.0"
},
"shell": {
"name": "zsh",
"default": "unknown",
"plugins": [
"atuin"
],
"preexec": "built-in"
},
"system": {
"os": "CentOS Linux",
"arch": "x86_64",
"version": "7",
"disks": [
{
"name": "overlay",
"filesystem": "overlay"
},
{
"name": "/dev/sda1",
"filesystem": "xfs"
},
{
"name": "/dev/sdb5",
"filesystem": "xfs"
},
{
"name": "/dev/sda1",
"filesystem": "xfs"
},
{
"name": "/dev/sdb5",
"filesystem": "xfs"
},
{
"name": "/dev/sdb5",
"filesystem": "xfs"
},
{
"name": "/dev/sdb5",
"filesystem": "xfs"
},
{
"name": "/dev/sdb4",
"filesystem": "xfs"
},
{
"name": "/dev/sdb4",
"filesystem": "xfs"
},
{
"name": "/dev/sdb4",
"filesystem": "xfs"
},
{
"name": "/dev/sdb5",
"filesystem": "xfs"
},
{
"name": "/dev/sdb5",
"filesystem": "xfs"
}
]
}
}
Config
## where to store your database, default is your system data directory
## linux/mac: ~/.local/share/atuin/history.db
## windows: %USERPROFILE%/.local/share/atuin/history.db
db_path = "~/.history.db"
## where to store your encryption key, default is your system data directory
## linux/mac: ~/.local/share/atuin/key
## windows: %USERPROFILE%/.local/share/atuin/key
# key_path = "~/.key"
## where to store your auth session token, default is your system data directory
## linux/mac: ~/.local/share/atuin/session
## windows: %USERPROFILE%/.local/share/atuin/session
# session_path = "~/.session"
## date format used, either "us" or "uk"
# dialect = "us"
## default timezone to use when displaying time
## either "l", "local" to use the system's current local timezone, or an offset
## from UTC in the format of "<+|->H[H][:M[M][:S[S]]]"
## for example: "+9", "-05", "+03:30", "-01:23:45", etc.
# timezone = "local"
## enable or disable automatic sync
# auto_sync = true
## enable or disable automatic update checks
update_check = true
## address of the sync server
# sync_address = "https://api.atuin.sh"
## 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 after every command
# sync_frequency = "10m"
## which search mode to use
## possible values: prefix, fulltext, fuzzy, skim
# search_mode = "fuzzy"
## which filter mode to use by default
## possible values: "global", "host", "session", "directory", "workspace"
## consider using search.filters to customize the enablement and order of filter modes
# filter_mode = "global"
## With workspace filtering enabled, Atuin will filter for commands executed
## in any directory within a git repository tree (default: false).
##
## To use workspace mode by default when available, set this to true and
## set filter_mode to "workspace" or leave it unspecified and
## set search.filters to include "workspace" before other filter modes.
# workspaces = false
## which filter mode to use when atuin is invoked from a shell up-key binding
## the accepted values are identical to those of "filter_mode"
## leave unspecified to use same mode set in "filter_mode"
# filter_mode_shell_up_key_binding = "global"
## which search mode to use when atuin is invoked from a shell up-key binding
## the accepted values are identical to those of "search_mode"
## leave unspecified to use same mode set in "search_mode"
# search_mode_shell_up_key_binding = "fuzzy"
## which style to use
## possible values: auto, full, compact
# style = "auto"
style = "full"
## the maximum number of lines the interface should take up
## set it to 0 to always go full screen
# inline_height = 0
## the maximum number of lines the interface should take up
## when atuin is invoked from a shell up-key binding
## the accepted values are identical to those of "inline_height"
# inline_height_shell_up_key_binding = 0
## Invert the UI - put the search bar at the top , Default to `false`
# invert = false
## enable or disable showing a preview of the selected command
## useful when the command is longer than the terminal width and is cut off
# show_preview = true
## what to do when the escape key is pressed when searching
## possible values: return-original, return-query
# exit_mode = "return-original"
## possible values: emacs, subl
# word_jump_mode = "emacs"
## characters that count as a part of a word
# word_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
## number of context lines to show when scrolling by pages
# scroll_context_lines = 1
## use ctrl instead of alt as the shortcut modifier key for numerical UI shortcuts
## alt-0 .. alt-9
# ctrl_n_shortcuts = false
## default history list format - can also be specified with the --format arg
# history_format = "{time}\t{command}\t{duration}"
## prevent commands matching any of these regexes from being written to history.
## Note that these regular expressions are unanchored, i.e. if they don't start
## with ^ or end with $, they'll match anywhere in the command.
## For details on the supported regular expression syntax, see
## https://docs.rs/regex/latest/regex/#syntax
# history_filter = [
# "^secret-cmd",
# "^innocuous-cmd .*--secret=.+",
# ]
## prevent commands run with cwd matching any of these regexes from being written
## to history. Note that these regular expressions are unanchored, i.e. if they don't
## start with ^ or end with $, they'll match anywhere in CWD.
## For details on the supported regular expression syntax, see
## https://docs.rs/regex/latest/regex/#syntax
# cwd_filter = [
# "^/very/secret/area",
# ]
## Configure the maximum height of the preview to show.
## Useful when you have long scripts in your history that you want to distinguish
## by more than the first few lines.
# max_preview_height = 4
## Configure whether or not to show the help row, which includes the current Atuin
## version (and whether an update is available), a keymap hint, and the total
## amount of commands in your history.
# show_help = true
## Configure whether or not to show tabs for search and inspect
# show_tabs = true
## Configure whether or not the tabs row may be auto-hidden, which includes the current Atuin
## tab, such as Search or Inspector, and other tabs you may wish to see. This will
## only be hidden if there are fewer than this count of lines available, and does not affect the use
## of keyboard shortcuts to switch tab. 0 to never auto-hide, default is 8 (lines).
## This is ignored except in `compact` mode.
# auto_hide_height = 8
## Defaults to true. This matches history against a set of default regex, and will not save it if we get a match. Defaults include
## 1. AWS key id
## 2. Github pat (old and new)
## 3. Slack oauth tokens (bot, user)
## 4. Slack webhooks
## 5. Stripe live/test keys
# secrets_filter = true
## Defaults to true. If enabled, upon hitting enter Atuin will immediately execute the command. Press tab to return to the shell and edit.
# This applies for new installs. Old installs will keep the old behaviour unless configured otherwise.
enter_accept = true
## Defaults to false. If enabled, when triggered after && or ||, Atuin will complete commands to chain rather than replace the current line.
# command_chaining = false
## Defaults to "emacs". This specifies the keymap on the startup of `atuin
## search`. If this is set to "auto", the startup keymap mode in the Atuin
## search is automatically selected based on the shell's keymap where the
## keybinding is defined. If this is set to "emacs", "vim-insert", or
## "vim-normal", the startup keymap mode in the Atuin search is forced to be
## the specified one.
# keymap_mode = "auto"
## Cursor style in each keymap mode. If specified, the cursor style is changed
## in entering the cursor shape. Available values are "default" and
## "{blink,steady}-{block,underline,bar}".
# keymap_cursor = { emacs = "blink-block", vim_insert = "blink-block", vim_normal = "steady-block" }
# network_connect_timeout = 5
# network_timeout = 5
## Timeout (in seconds) for acquiring a local database connection (sqlite)
# local_timeout = 5
## Set this to true and Atuin will minimize motion in the UI - timers will not update live, etc.
## Alternatively, set env NO_MOTION=true
# prefers_reduced_motion = false
[stats]
## Set commands where we should consider the subcommand for statistics. Eg, kubectl get vs just kubectl
# common_subcommands = [
# "apt",
# "cargo",
# "composer",
# "dnf",
# "docker",
# "git",
# "go",
# "ip",
# "jj",
# "kubectl",
# "nix",
# "nmcli",
# "npm",
# "pecl",
# "pnpm",
# "podman",
# "port",
# "systemctl",
# "tmux",
# "yarn",
# ]
## Set commands that should be totally stripped and ignored from stats
# common_prefix = ["sudo"]
## Set commands that will be completely ignored from stats
# ignored_commands = [
# "cd",
# "ls",
# "vi"
# ]
[keys]
# Defaults to true. If disabled, using the up/down key won't exit the TUI when scrolled past the first/last entry.
# scroll_exits = true
# Defaults to true. The left arrow key will exit the TUI when scrolling before the first character
# exit_past_line_start = true
# Defaults to true. The right arrow key performs the same functionality as Tab and copies the selected line to the command line to be modified.
# accept_past_line_end = true
[sync]
# Enable sync v2 by default
# This ensures that sync v2 is enabled for new installs only
# In a later release it will become the default across the board
records = true
[preview]
## which preview strategy to use to calculate the preview height (respects max_preview_height).
## possible values: auto, static
## auto: length of the selected command.
## static: length of the longest command stored in the history.
## fixed: use max_preview_height as fixed height.
# strategy = "auto"
[daemon]
## Enables using the daemon to sync. Requires the daemon to be running in the background. Start it with `atuin daemon`
# enabled = true
## How often the daemon should sync in seconds
# sync_frequency = 300
## The path to the unix socket used by the daemon (on unix systems)
## linux/mac: ~/.local/share/atuin/atuin.sock
## windows: Not Supported
# socket_path = "~/.local/share/atuin/atuin.sock"
## Use systemd socket activation rather than opening the given path (the path must still be correct for the client)
## linux: false
## mac/windows: Not Supported
# systemd_socket = false
## The port that should be used for TCP on non unix systems
# tcp_port = 8889
# [theme]
## Color theme to use for rendering in the terminal.
## There are some built-in themes, including the base theme ("default"),
## "autumn" and "marine". You can add your own themes to the "./themes" subdirectory of your
## Atuin config (or ATUIN_THEME_DIR, if provided) as TOML files whose keys should be one or
## more of AlertInfo, AlertWarn, AlertError, Annotation, Base, Guidance, Important, and
## the string values as lowercase entries from this list:
## https://ogeon.github.io/docs/palette/master/palette/named/index.html
## If you provide a custom theme file, it should be called "NAME.toml" and the theme below
## should be the stem, i.e. `theme = "NAME"` for your chosen NAME.
# name = "autumn"
## Whether the theme manager should output normal or extra information to help fix themes.
## Boolean, true or false. If unset, left up to the theme manager.
# debug = true
[search]
## The list of enabled filter modes, in order of priority.
## The "workspace" mode is skipped when not in a workspace or workspaces = false.
## Default filter mode can be overridden with the filter_mode setting.
# filters = [ "global", "host", "session", "workspace", "directory" ]
database got corrupted when i tried to open another terminal using vscode
.zshrc
# # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# # Initialization code that may require console input (password prompts, [y/n]
# # confirmations, etc.) must go above this block; everything else may go below.
# if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
# source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
# fi
# typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
# zmodload zsh/zprof
# ================================
continuum/zinit.git "$ZINIT_HOME"
export DISTRO_VERSION=$(/bin/lsb_release -a 2>/dev/null | awk 'NR==4 {print $2}')
export ZSH="$HOME/.oh-my-zsh"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
DISABLE_UNTRACKED_FILES_DIRTY="true"
ZSH_DISABLE_COMPFIX="true"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
# ZSH_THEME="re5et"
# ZSH_THEME="jonathan"
# ZSH_THEME="xiong-chiamiov-plus"
# ZSH_THEME="robbyrussell"
# ZSH_THEME="agnoster"
# ZSH_THEME="powerlevel10k/powerlevel10k"
# ZSH_THEME="3den"
# ZSH_THEME="adben"
# ZSH_THEME="af-magic"
# ZSH_THEME="afowler"
# ZSH_THEME="alanpeabody"
# ZSH_THEME="amuse"
# ZSH_THEME="apple"
# ZSH_THEME="arrow"
# ZSH_THEME="aussiegeek"
# ZSH_THEME="avit"
# ZSH_THEME="awesomepanda"
# ZSH_THEME="bira"
# ZSH_THEME="blinks"
# ZSH_THEME="bureau"
# ZSH_THEME="candy-kingdom"
# ZSH_THEME="candy"
# ZSH_THEME="clean"
# ZSH_THEME="cloud"
# ZSH_THEME="crcandy"
# ZSH_THEME="crunch"
# ZSH_THEME="cypher"
# ZSH_THEME="dallas"
# ZSH_THEME="darkblood"
# ZSH_THEME="daveverwer"
# ZSH_THEME="dieter"
# ZSH_THEME="dogenpunk"
# ZSH_THEME="dpoggi"
# ZSH_THEME="dstufft"
# ZSH_THEME="dst"
# ZSH_THEME="duellj"
# ZSH_THEME="eastwood"
# ZSH_THEME="edvardm"
# ZSH_THEME="emotty"
# ZSH_THEME="essembeh"
# ZSH_THEME="evan"
# ZSH_THEME="fino-time"
# ZSH_THEME="fino"
# ZSH_THEME="fishy"
# ZSH_THEME="flazz"
# ZSH_THEME="fletcherm"
# ZSH_THEME="fox"
# ZSH_THEME="frisk"
# ZSH_THEME="frontcube"
# ZSH_THEME="funky"
# ZSH_THEME="fwalch"
# ZSH_THEME="gallifrey"
# ZSH_THEME="gallois"
# ZSH_THEME="garyblessington"
# ZSH_THEME="gentoo"
# ZSH_THEME="geoffgarside"
# ZSH_THEME="gianu"
# ZSH_THEME="gnzh"
# ZSH_THEME="gozilla"
# ZSH_THEME="half-life"
# ZSH_THEME="humza"
# ZSH_THEME="imajes"
# ZSH_THEME="intheloop"
# ZSH_THEME="itchy"
# ZSH_THEME="jaischeema"
# ZSH_THEME="jbergantine"
# ZSH_THEME="jispwoso"
# ZSH_THEME="jnrowe"
# ZSH_THEME="josh"
# ZSH_THEME="jreese"
# ZSH_THEME="jtriley"
# ZSH_THEME="juanghurtado"
# ZSH_THEME="junkfood"
# ZSH_THEME="kafeitu"
# ZSH_THEME="kardan"
# ZSH_THEME="kennethreitz"
# ZSH_THEME="kiwi"
# ZSH_THEME="kolo"
# ZSH_THEME="kphoen"
# ZSH_THEME="lambda"
# ZSH_THEME="linuxonly"
# ZSH_THEME="lukerandall"
# ZSH_THEME="macovsky-ruby -> macovsky"
# ZSH_THEME="macovsky"
# ZSH_THEME="maran"
# ZSH_THEME="mgutz"
# ZSH_THEME="mh"
# ZSH_THEME="michelebologna"
# ZSH_THEME="mikeh"
# ZSH_THEME="miloshadzic"
# ZSH_THEME="minimal"
# ZSH_THEME="mira"
# ZSH_THEME="mlh"
# ZSH_THEME="mortalscumbag"
# ZSH_THEME="mrtazz"
# ZSH_THEME="murilasso"
# ZSH_THEME="muse"
# ZSH_THEME="nanotech"
# ZSH_THEME="nebirhos"
# ZSH_THEME="nicoulaj"
# ZSH_THEME="norm"
# ZSH_THEME="obraun"
# ZSH_THEME="peepcode"
# ZSH_THEME="philips"
# ZSH_THEME="pmcgee"
# ZSH_THEME="pygmalion-virtualenv"
# ZSH_THEME="pygmalion"
# ZSH_THEME="random"
# ZSH_THEME="refined"
# ZSH_THEME="rgm"
# ZSH_THEME="risto"
# ZSH_THEME="rixius"
# ZSH_THEME="rkj"
# ZSH_THEME="rkj-repos"
# ZSH_THEME="sammy"
# ZSH_THEME="simonoff"
# ZSH_THEME="simple"
# ZSH_THEME="skaro"
# ZSH_THEME="smt"
# ZSH_THEME="Soliah"
# ZSH_THEME="sonicradish"
# ZSH_THEME="sorin"
# ZSH_THEME="sporty_256"
# ZSH_THEME="steeef"
# ZSH_THEME="strug"
# ZSH_THEME="sunaku"
# ZSH_THEME="sunrise"
# ZSH_THEME="superjarin"
# ZSH_THEME="suvash"
# ZSH_THEME="takashiyoshida"
# ZSH_THEME="terminalparty"
# ZSH_THEME="theunraveler"
# ZSH_THEME="tjkirch_mod"
# ZSH_THEME="tjkirch"
# ZSH_THEME="tonotdo"
# ZSH_THEME="trapd00r"
# ZSH_THEME="wedisagree"
# ZSH_THEME="wezm"
# ZSH_THEME="wezm+"
# ZSH_THEME="wuffers"
# ZSH_THEME="xiong-chiamiov"
# ZSH_THEME="ys"
# ZSH_THEME="zhann"
#
# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in $ZSH/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment one of the following lines to change the auto-update behavior
# zstyle ':omz:update' mode disabled # disable automatic updates
zstyle ':omz:update' mode auto # update automatically without asking
# zstyle ':omz:update' mode reminder # just remind me to update when it's time
# Uncomment the following line to change how often to auto-update (in days).
# zstyle ':omz:update' frequency 13
# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS="true"
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# You can also set it to another string to have that shown instead of the default red dots.
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
# Git fast plugin
plugins=(
# gitfast
zoxide
# z
# zbell
vim-interaction
# ripgrep
rsync
# git
# globalias
# colorize
common-aliases
alias-tips
# zsh-autocomplete
zsh-autosuggestions
zsh-syntax-highlighting
zsh-completion-generator
# zsh-abbr
# zsh-expand-all
fast-syntax-highlighting
history-substring-search
zsh-interactive-cd
fzf-tab
fzf-tab-source
# zellij
dirhistory
jsontools
# fzf
# fd
# emacs
extract
poetry
command-time
autoupdate
auto-notify
# notify
# zsh-vi-mode
fzf-zsh-plugin
zsh-you-should-use
zsh-fzf-history-search
extend-history
# zsh-histdb
# zsh-histdb-skim
history
# zsh-expand
# zsh-history-substring-search
)
_zsh_autosuggest_strategy_histdb_top_here() {
local query="select commands.argv from
history left join commands on history.command_id = commands.rowid
left join places on history.place_id = places.rowid
where places.dir LIKE '$(sql_escape $PWD)%'
and commands.argv LIKE '$(sql_escape $1)%'
group by commands.argv order by count(*) desc limit 1"
suggestion=$(_histdb_query "$query")
}
# ZSH_AUTOSUGGEST_STRATEGY=histdb_top_here
#
_zsh_autosuggest_strategy_histdb_top() {
local query="
select commands.argv from history
left join commands on history.command_id = commands.rowid
left join places on history.place_id = places.rowid
where commands.argv LIKE '$(sql_escape $1)%'
group by commands.argv, places.dir
order by places.dir != '$(sql_escape $PWD)', count(*) desc
limit 1
"
suggestion=$(_histdb_query "$query")
}
# ZSH_AUTOSUGGEST_STRATEGY=histdb_top
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/ripgrep/complete
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/fd/contrib/completion
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh/Completion/Unix/Command
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zchee-zsh-completions/src/zsh
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/as2/completion
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/television/completion
fpath+=${HOME}/.custom/zsh/pure
# remove duplicate PATH
typeset -U path PATH
# multi redirect (e.x. echo "hello" > hoge1.txt > hoge2.txt)
setopt multios
# disable stty stop
stty stop undef
# auto time after REPORTTIME sec
export REPORTTIME=1
# emacs like keybind (e.x. Ctrl-a, Ctrl-e)
bindkey -e
export EDITOR='nvim'
export FZF_PREVIEW_ADVANCED=true
export FZF_PREVIEW_WINDOW=''
export FZF_DEFAULT_COMMAND="fd --hidden --strip-cwd-prefix --exclude .git"
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export FZF_ALT_C_COMMAND="fd --type=d --hidden --strip-cwd-prefix --exclude .git"
show_file_or_dir_preview="if [ -d {} ]; then eza --tree --color=always {} | head -200; else bat -n --color=always --line-range :500 {}; fi"
export FZF_CTRL_T_OPTS="--preview '$show_file_or_dir_preview'"
export FZF_ALT_C_OPTS="--preview 'eza --tree --color=always {} | head -200'"
export AUTO_NOTIFY_THRESHOLD=60
# export AUTO_NOTIFY_BODY="It completed in %elapsed seconds with exit code %exit_code"
export HISTFILE=$HOME/.zsh_history
HISTSIZE=100000000
SAVEHIST=100000000
ZVM_INIT_MODE=sourcing
[ -f $ZSH/oh-my-zsh.sh ] && source $ZSH/oh-my-zsh.sh
# [ -f $HOME/.zplug/init.zsh ] && source $HOME/.zplug/init.zsh
# User configuration
setopt appendhistory #Append history to the history file (no overwriting)
setopt sharehistory #Share history across terminals
setopt share_history # share command history data
setopt extended_history
setopt incappendhistory #Immediately append to the history file, not just when a term is killed
setopt hist_ignore_space
setopt hist_expire_dups_first
setopt hist_ignore_all_dups # Delete old recorded entry if new entry is a duplicate.
# setopt hist_ignore_dups # ignore duplication command history list
setopt hist_ignore_space # ignore when commands starts with space
setopt hist_verify
setopt bang_hist # Treat the '!' character specially during expansion.
# setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits.
setopt hist_find_no_dups # Do not display a line previously found.
setopt hist_save_no_dups # Don't write duplicate entries in the history file.
setopt hist_reduce_blanks # Remove superfluous blanks before recording entry.
# historical backward/forward search with linehead string binded to ^P/^N
autoload history-search-end
zle -N history-beginning-search-backward-end history-search-end
zle -N history-beginning-search-forward-end history-search-end
# bindkey "^P" history-beginning-search-backward-end
# bindkey "^N" history-beginning-search-forward-end
bindkey '^p' history-search-backward
bindkey '^n' history-search-forward
setopt ignore_eof
setopt no_clobber
setopt rm_star_wait
setopt auto_continue
setopt check_jobs
setopt long_list_jobs
setopt numeric_glob_sort
setopt nomatch
unsetopt list_ambiguous
# auto menu complete
setopt auto_menu
# auto change directory
setopt auto_cd
# use brace
setopt brace_ccl
# auto directory pushd that you can get dirs list by cd -[tab]
setopt auto_pushd
# no beep sound when complete list displayed
setopt nolistbeep
setopt interactive_comments
# completion
# If unset, the cursor is set to the end of the word if completion is
# started. Otherwise it stays there and completion is done from both ends.
# This is needed for the prefix completer
setopt COMPLETE_IN_WORD
# don't move the cursor to the end AFTER a completion was inserted
setopt NO_ALWAYS_TO_END
# compacked complete list display
setopt list_packed
setopt LIST_PACKED
# Prevents aliases on the command line from being internally substituted before completion is attempted.
# The effect is to make the alias a distinct command for completion purposes.
# complete path when aliased command
setopt complete_aliases
setopt COMPLETE_ALIASES
zle_highlight=('paste:none')
# beeping is annoying
unsetopt BEEP
_comp_options+=(globdots) # Include hidden files.
# declare a list of expandable aliases to fill up later
typeset -a ealiases
ealiases=()
# write a function for adding an alias to the list mentioned above
function abbrev-alias() {
alias $1
ealiases+=(${1%%\=*})
}
# export
function addToPath {
if [[ -d "$1" ]] then
PATH="$1:$PATH"
fi
}
ediff_files() {
emacs -Q --eval "(progn (ediff-files \"$1\" \"$2\") (other-window 1))"
}
# expand any aliases in the current line buffer
function expand-ealias() {
if [[ $LBUFFER =~ "\<(${(j:|:)ealiases})\$" ]]; then
zle _expand_alias
zle expand-word
fi
zle magic-space
}
zle -N expand-ealias
# Bind the space key to the expand-alias function above, so that space will expand any expandable aliases
bindkey ' ' expand-ealias
bindkey '^ ' magic-space # control-space to bypass completion
bindkey -M isearch " " magic-space # normal space during searches
# A function for expanding any aliases before accepting the line as is and executing the entered command
expand-alias-and-accept-line() {
expand-ealias
zle .backward-delete-char
zle .accept-line
}
zle -N accept-line expand-alias-and-accept-line
zvm_after_commands+=('[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh')
# . ~/.local/bin/z.sh
# Use lf to switch directories and bind it to ctrl-o
lfcd () {
tmp="$(mktemp)"
lf -last-dir-path="$tmp" "$@"
if [ -f "$tmp" ]; then
dir="$(cat "$tmp")"
rm -f "$tmp"
[ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir"
fi
}
bindkey -s '^o' 'lfcd\n'
bindkey -M emacs '^P' history-substring-search-up
bindkey -M emacs '^N' history-substring-search-down
# \cat -v
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
[ -f ~/.config/zsh/zsh-aliases ] && source ~/.config/zsh/zsh-aliases
# Uncomment the following line to change how often to auto-update (in days).
export UPDATE_ZSH_DAYS=1
export NOVAS_LIC_EXP_CTRL=0
export GHIST_DEFAULT_OPTIONS="-fc upper -f time-,user+,branch,cl,cwd-,cmd -fe cmd:first_file*,cmd:genie_print_env*,cwd:*scratch.???regress*,cwd:*cpuregress_data*,cwd:/tmp*,cmd:ghist*,cmd:nvrun*"
source /home/rmondal/.config/broot/launcher/bash/br
source /etc/profile.d/vte.sh
# Generated for envman. Do not edit.
[ -s "$HOME/.config/envman/load.sh" ] && source "$HOME/.config/envman/load.sh"
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
# [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# Add below lines into $HOME/.zshrc
easyjump_home=/home/nv/utils/stepstone/latest/easyjump
if [ -s $easyjump_home/bin/easyjump.zsh ]; then
source $easyjump_home/bin/easyjump.zsh $easyjump_home/bin
fi
# source $HOME/.oh-my-zsh/custom/plugins/zsh-histdb/sqlite-history.zsh
# source /home/rmondal/.oh-my-zsh/custom/plugins/zsh-histdb-skim/zsh-histdb-skim.zsh
# bindkey '^R' histdb-skim-widget
# bindkey '^R' histdb-fzf-widget
autoload -Uz add-zsh-hook
autoload -Uz compinit
compinit -u
comp_options+=(globdots) # With hidden files
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit
if [[ -v VSCODE_GIT_ASKPASS_NODE ]]; then
echo "Welcome to VSCODE"
addToPath "$VSCODE_GIT_ASKPASS_NODE:h/bin/remote-cli"
if command -v cursor > /dev/null 2>&1; then
alias code=cursor
else
alias cursor=code
fi
fi
# =============================================================================
# STARSHIP ENVIRONMENT VARIABLES
# =============================================================================
# Starship configuration file location
export STARSHIP_CONFIG="$HOME/.config/starship.toml"
# Starship specific environment variables
export STARSHIP_CACHE="$HOME/.cache/starship"
export STARSHIP_LOG="error"
# Ensure starship cache directory exists
[ ! -d "$STARSHIP_CACHE" ] && mkdir -p "$STARSHIP_CACHE"
# =============================================================================
# STARSHIP PROMPT INITIALIZATION
# =============================================================================
# Starship prompt - modern, fast, and customizable
# Install with: curl -sS https://starship.rs/install.sh | sh
# Or with package manager: sudo apt install starship (Ubuntu/Debian)
# brew install starship (macOS)
# sudo dnf install starship (Fedora/RHEL)
# Initialize Starship prompt
if command -v starship > /dev/null 2>&1; then
eval "$(starship init zsh)"
else
echo "Starship not found. Install with: curl -sS https://starship.rs/install.sh | sh"
fi
if [[ -v VSCODE_GIT_ASKPASS_NODE ]]; then
else
if command -v atuin > /dev/null 2>&1; then
eval "$(atuin init zsh --disable-up-arrow)"
else
echo "atuin not found"
fi
fi
# .zshrc
# autoload -U promptinit; promptinit
# prompt pure
# zprof
# =============================================================================
# LOAD ALL PLUGINS
# =============================================================================
# zinit load
# [ -f ~/.resh/shellrc ] && source ~/.resh/shellrc # this line was added by RESH
is there a way to force recreate the database from scratch again?