increase bash command history size

changed rofi font to jetbrains mono
implemented bash completions for navigate
started script to use fzf for reverse command search in bash
This commit is contained in:
quak
2025-01-20 00:11:49 +01:00
parent e7046407c2
commit d5b880915e
4 changed files with 32 additions and 12 deletions

View File

@@ -2,8 +2,13 @@
# ~/.bashrc
#
# disable duplicates in command history
# configure behaviour of command history
## disable duplicates in command history
export HISTCONTROL=ignoreboth:erasedups
## increase history size
history_size=2000
export HISTSIZE=${history_size}
export HISTFILESIZE=${history_size}
# If not running interactively, don't do anything
# [[ $- != *i* ]] && return
@@ -30,7 +35,6 @@ alias diff='diff --color=always'
alias bashsource='source ~/.bashrc'
# short forms for tmux commands
## run script to setup default tmux session and then attach the session
## attaching the session needs to be done from the calling shell, otherwise
## the setup script will only terminate after detaching or killing the session
@@ -55,12 +59,9 @@ if [[ "$PATH" != *"dotfiles/misc/scripts/"* ]]; then
export PATH=$PATH:$HOME/dotfiles/misc/scripts/
fi
# setup starship
# setup `starship`
eval "$(starship init bash)"
# source shell scripts
source_list=()
## source alias file
source ~/.bash_alias

View File

@@ -0,0 +1,2 @@
alias test='eval $(fc -lnr 1 | fzf --tmux )'

View File

@@ -5,18 +5,35 @@ __call_navigate() {
eval "$(navigate ${arg_pid} $@)"
}
push() {
function push {
__call_navigate "push $@"
}
pop() {
function pop {
__call_navigate "pop $@"
}
stack() {
function stack {
__call_navigate "stack $@"
}
book() {
function book {
__call_navigate "bookmark $@"
}
# completion for `push`
function _push {
CURRENT_WORD=${COMP_WORDS[COMP_CWORD]}
DIRS="$(find . -maxdepth 1 -type d | grep -vx "." | grep -vx ".." | sed s^"./"^^)"
COMPREPLY=($(compgen -W "${DIRS}" -- $CURRENT_WORD))
}
# completion for `book`
function _book {
CURRENT_WORD=${COMP_WORDS[COMP_CWORD]}
BOOKMARKS="$(__call_navigate bookmark names)"
COMPREPLY=($(compgen -W "${BOOKMARKS}" -- $CURRENT_WORD))
}
complete -F _push push
complete -F _book book

View File

@@ -1,5 +1,5 @@
* {
font: "Victor Mono Nerd Font 13";
font: "JetBrains Mono Nerd Font 14";
zx-transparent: transparent;
zx-white: #C8C8C8FF;