diff --git a/tongfang/.bash_aliases b/tongfang/.bash_aliases index cd59276..6ff7470 100644 --- a/tongfang/.bash_aliases +++ b/tongfang/.bash_aliases @@ -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' \ No newline at end of file +alias ssh='ensure_ssh_key; ssh' +alias rgf='rg --files | rg' diff --git a/tongfang/.bashrc b/tongfang/.bashrc index 53c0a35..d283691 100644 --- a/tongfang/.bashrc +++ b/tongfang/.bashrc @@ -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 \ No newline at end of file diff --git a/tongfang/.ripgreprc b/tongfang/.ripgreprc new file mode 100644 index 0000000..2256b46 --- /dev/null +++ b/tongfang/.ripgreprc @@ -0,0 +1 @@ +--hidden \ No newline at end of file