Last active
July 27, 2018 15:28
-
-
Save libbkmz/acf496a4c44b57f65e3f7ca0d902ffbf to your computer and use it in GitHub Desktop.
Enable neat and tidy bash history usage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## arrow up | |
"\e[A":history-search-backward | |
## arrow down | |
"\e[B":history-search-forward |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set-option -g history-limit 65536 | |
#set -g default-terminal "screen-256color" | |
#set -g default-terminal "screen-256color" | |
set -g default-terminal "tmux-256color" | |
set -g mouse on | |
# set -g mode-mouse on | |
# set -g mouse-select-window on | |
# ctrl left-right | |
set-window-option -g xterm-keys on | |
# home-end | |
#bind -n End send-key C-e | |
#bind -n Home send-key C-a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shopt -s histappend | |
export HISTSIZE=1000000 # big big history | |
export HISTFILESIZE=1000000 # big big history |
bashrc vs .bash_profile
разница между ними в том что .bash_profile исполняется при прямом логине в shell, тогда как .bashrc выполняется для non-login shells. Таким образом если вы например хотите настроить алиасы для работы в консоли на удаленном сервере - ваш файл bash_profile, если это будет отличный от прямого входа в shell - тогда настраиваем bashrc.
https://t.me/bykvaadm/787
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
export PROMPT_COMMAND="history -a; $PROMPT_COMMAND"