Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 1st, 2012  |  syntax: None  |  size: 0.36 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Is there a convenient autocomplete in unix for previously entered commands like in MATLAB?
  2. alias prev 'history | grep !^'
  3.        
  4. 23 17:43 foo bar
  5. 47 19:29 foo fighters
  6.        
  7. % echo $history
  8. % set history=20
  9. % echo a
  10. a
  11. % pwd
  12. /some/dir
  13. % !e
  14. echo a
  15. a
  16. % history
  17.      9  echo a
  18.     10  pwd
  19.     11  echo a
  20.     12  history
  21. % !-3
  22. pwd
  23. /some/dir
  24. % !e:s/a/wow/
  25. echo wow
  26. wow
  27. %