Posted By

arnski on 11/01/11


Tagged

Bash key button history up


Versions (?)

Bash History Settings


 / Published in: Bash
 

  1. #HISTORY SETTINGS
  2. # ################
  3.  
  4. # don't put duplicate lines in the history. See bash(1) for more options
  5. export HISTCONTROL=ignoredups
  6.  
  7. # ... and ignore same sucessive entries.
  8. export HISTCONTROL=ignoreboth
  9.  
  10. # Increase Historysize
  11. export HISTSIZE=10000
  12.  
  13. # check the window size after each command and, if necessary,
  14. # update the values of LINES and COLUMNS.
  15. shopt -s checkwinsize
  16.  
  17. # Ensure history is appended to .bash_history
  18. shopt -s histappend
  19.  
  20. # Whenever displaying the prompt, write the previous line to disk
  21. # This deals with the "multiple window"- history problem
  22. export PROMPT_COMMAND='history -a'
  23.  
  24. # History- Search by pressing up or down
  25. bind '"\e[A"':history-search-backward
  26. bind '"\e[B"':history-search-forward

Report this snippet  

You need to login to post a comment.