improve history
This commit is contained in:
parent
29445f479e
commit
8af513b64e
2 changed files with 40 additions and 24 deletions
28
README.md
28
README.md
|
@ -10,25 +10,31 @@ Friend tools:
|
||||||
- vim or neovim, vundle
|
- vim or neovim, vundle
|
||||||
- python
|
- python
|
||||||
- perl
|
- perl
|
||||||
|
- sdkman
|
||||||
- fzf
|
- fzf
|
||||||
- mcfly
|
|
||||||
|
|
||||||
|
|
||||||
Configuration file *~/config/chezmoi/chezmoi.toml*
|
Configuration file *~/config/chezmoi/chezmoi.toml*
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[data]
|
[data]
|
||||||
|
# git configuration
|
||||||
git_email = ""
|
git_email = ""
|
||||||
git_alias = ""
|
git_alias = ""
|
||||||
projectdir = ""
|
# fzf search path for "p" command
|
||||||
java6_version = ""
|
projectdir = "~/work"
|
||||||
java7_version = ""
|
# deployment java path for "d" command
|
||||||
java8_version = ""
|
deploydir = "~/dist"
|
||||||
java11_version = ""
|
# Java versions from sdkman
|
||||||
deploydir = ""
|
java6_version = "6.0.119-zulu"
|
||||||
java_truststore_file = ""
|
java7_version = "7.0.342-zulu"
|
||||||
java_truststore_password = ""
|
java8_version = "8.0.302-open"
|
||||||
extra_ca_cert = ""
|
java11_version = "11.0.12-open"
|
||||||
|
# extra certificate for NodeJs (PEM file) to trust HTTPS proxy
|
||||||
|
extra_ca_cert = "/home/yannic/config/security/ca-node.pem"
|
||||||
|
# Java truststore for Maven to trust HTTPS proxy
|
||||||
|
java_truststore_file = "/home/yannic/config/security/snef-security.jks"
|
||||||
|
java_truststore_password = "secret"
|
||||||
|
# docker compose bin
|
||||||
docker_compose_command = "/usr/bin/docker compose"
|
docker_compose_command = "/usr/bin/docker compose"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
36
dot_bashrc
36
dot_bashrc
|
@ -14,16 +14,7 @@
|
||||||
bind '"\e[A":history-search-backward'
|
bind '"\e[A":history-search-backward'
|
||||||
bind '"\e[B":history-search-forward'
|
bind '"\e[B":history-search-forward'
|
||||||
|
|
||||||
# don't put duplicate lines or lines starting with space in the history.
|
|
||||||
# See bash(1) for more options
|
|
||||||
HISTCONTROL=ignoreboth
|
|
||||||
|
|
||||||
# append to the history file, don't overwrite it
|
|
||||||
shopt -s histappend
|
|
||||||
|
|
||||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
|
||||||
HISTSIZE=1000
|
|
||||||
HISTFILESIZE=2000
|
|
||||||
|
|
||||||
# check the window size after each command and, if necessary,
|
# check the window size after each command and, if necessary,
|
||||||
# update the values of LINES and COLUMNS.
|
# update the values of LINES and COLUMNS.
|
||||||
|
@ -143,9 +134,28 @@ if [ -d "$HOME/.bashrc.d/" ]; then
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# replace fzf history (CTRL-R) by https://github.com/cantino/mcfly
|
# ---------------------------------------------------------------------------
|
||||||
if hash mcfly 2>/dev/null; then
|
# History
|
||||||
eval "$(mcfly init bash)"
|
# ---------------------------------------------------------------------------
|
||||||
fi
|
set -o history
|
||||||
|
#unset HISTFILE
|
||||||
|
|
||||||
|
# don't put duplicate lines or lines starting with space in the history.
|
||||||
|
# See bash(1) for more options
|
||||||
|
HISTCONTROL=ignoreboth
|
||||||
|
|
||||||
|
# append to the history file, don't overwrite it
|
||||||
|
shopt -s histappend
|
||||||
|
|
||||||
|
# store multiline commands
|
||||||
|
shopt -s cmdhist
|
||||||
|
|
||||||
|
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||||
|
HISTSIZE=2000
|
||||||
|
HISTFILESIZE=2000
|
||||||
|
|
||||||
|
# don't story history commands
|
||||||
|
HISTIGNORE=history*
|
||||||
|
|
||||||
|
# merge history b/w sessions
|
||||||
|
PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
|
||||||
|
|
Loading…
Add table
Reference in a new issue