Skip to content

Instantly share code, notes, and snippets.

@libbkmz
Last active July 27, 2018 15:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save libbkmz/acf496a4c44b57f65e3f7ca0d902ffbf to your computer and use it in GitHub Desktop.
Save libbkmz/acf496a4c44b57f65e3f7ca0d902ffbf to your computer and use it in GitHub Desktop.
Enable neat and tidy bash history usage
## arrow up
"\e[A":history-search-backward
## arrow down
"\e[B":history-search-forward
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
shopt -s histappend
export HISTSIZE=1000000 # big big history
export HISTFILESIZE=1000000 # big big history
@eugene-eryomenko
Copy link

export PROMPT_COMMAND="history -a; $PROMPT_COMMAND"

@libbkmz
Copy link
Author

libbkmz commented Jul 27, 2018

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