mirror of
https://github.com/bartvdbraak/dotfiles.git
synced 2025-04-27 06:31:20 +00:00
Add history search and append changes
This commit is contained in:
parent
6ba3228e8e
commit
1fbda2bff2
3 changed files with 22 additions and 1 deletions
|
@ -2,4 +2,5 @@ alias ll='ls -la'
|
|||
alias lt='ls --human-readable --size -1 -S --classify'
|
||||
alias nrebuild='sudo nixos-rebuild --use-remote-sudo switch'
|
||||
alias code='codium'
|
||||
alias ssh='ensure_ssh_key; ssh'
|
||||
alias ssh='ensure_ssh_key; ssh'
|
||||
alias rgf='rg --files | rg'
|
||||
|
|
|
@ -20,5 +20,24 @@ function ensure_ssh_key {
|
|||
fi
|
||||
}
|
||||
|
||||
# Map up/down arrow to search for history entries matching what is currently type in the command line.
|
||||
bind '"\e[A": history-search-backward'
|
||||
bind '"\e[B": history-search-forward'
|
||||
|
||||
export HISTSIZE=10000
|
||||
export HISTFILESIZE=10000
|
||||
|
||||
HISTCONTROL=erasedups
|
||||
HISTTIMEFORMAT='%F %T '
|
||||
|
||||
shopt -s histappend
|
||||
shopt -s cmdhist #Save multi line commands as one history entry
|
||||
PROMPT_COMMAND='history -a' #Append to history after each command
|
||||
|
||||
PROMPT_DIRTRIM=2
|
||||
PS1='\[\033[0;33m\][\u@\h:\w]\$\[\033[0m\] '
|
||||
|
||||
RIPGREP_CONFIG_PATH=~/.ripgreprc
|
||||
|
||||
# Disable ctrl+s
|
||||
stty -ixon
|
1
tongfang/.ripgreprc
Normal file
1
tongfang/.ripgreprc
Normal file
|
@ -0,0 +1 @@
|
|||
--hidden
|
Loading…
Reference in a new issue