From bb65fb968f46f5e0944e637aa5cbf7db5498e91d Mon Sep 17 00:00:00 2001 From: Pendosv Date: Wed, 15 Sep 2021 21:34:20 +0300 Subject: [PATCH] ref --- .bash_aliases | 7 ------- .bashrc | 15 +++++++++++++++ README.md | 17 +++++++++++++++-- 3 files changed, 30 insertions(+), 9 deletions(-) diff --git a/.bash_aliases b/.bash_aliases index fdf2229..22d181a 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -45,10 +45,3 @@ alias vis='vim "+set si"' # net alias ports='netstat -tulanp' - - - - - - - diff --git a/.bashrc b/.bashrc index 5adeef7..83f735b 100644 --- a/.bashrc +++ b/.bashrc @@ -1,4 +1,19 @@ +if type shopt 2>/dev/null 1>&2; then + + # corrections + shopt -s cdspell + shopt -s dirspell + + shopt -s histappend + PROMPT_COMMAND='history -a' +fi + +export HISTSIZE=10000 +export HISTIGNORE="&:l[lsa]:[bf]g:exit:q:clear:c:history:h" + + + parse_git_branch() { branch="$(git branch --show-current 2> /dev/null)" diff --git a/README.md b/README.md index ac3f0ac..d9db13f 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ ## Content * [Project description](#chapter-0) * [SSH](#chapter-1) +* [Tips](#chapter-2) @@ -22,7 +23,7 @@ Bash config files -## SSH: +## SSH Create ssh key on local device @@ -46,4 +47,16 @@ Using aliases: ```bash ssh host_name sftp host_name -``` \ No newline at end of file +``` + + +## Tips + +### Bash +```esc + .``` - last object\ +```ctrl + r``` - bash_history search\ +```history -d 130``` - delete 130 line\ +```history -c``` - delete all history\ + +### Vim +```d -> ctrl + end``` - delete from cursor to end of file\