Koozali.org: home of the SME Server

enhancing Shell History

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
enhancing Shell History
« on: August 04, 2007, 01:56:37 PM »
I'd like to share a VERY USEFUL TIP about linux I just discovered on a brazilian linux site.

Expand the "memory of your .bash_history to 2000 lines adding this on your .bashrc:

Code: [Select]
export HISTFILESIZE=2000
export HISTSIZE=2000

And now enhance the search of commands on your new bigger history.
Create a .inputrc with :

Code: [Select]
"\e[A": history-search-backward
"\e[B": history-search-forward


Next logon you'll be able to search command by start wo write them and use up/down arrows.

I'd love to see those enhancement on next release of SME :)
...

Offline haymann

  • *
  • 212
  • +0/-0
enhancing Shell History
« Reply #1 on: August 13, 2007, 09:15:31 PM »
Very cool. Thanks for the tips!
Ryan

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: enhancing Shell History
« Reply #2 on: August 13, 2007, 09:34:45 PM »
Quote from: "jader"
I'd love to see those enhancement on next release of SME :)
To make the developers aware of your wishes, please add a new feature request in the bugtracker.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline TrevorB

  • *
  • 259
  • +0/-0
    • http://www.batley.id.au
Re: enhancing Shell History
« Reply #3 on: August 14, 2007, 09:59:13 AM »
I'd love to see those enhancement on next release of SME :)
You could add an item in the wiki...!!!!  :-)

Trevor B

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: enhancing Shell History
« Reply #4 on: August 14, 2007, 05:30:49 PM »
...

Offline Normando

  • *
  • 841
  • +2/-1
    • Unixlan
Re: enhancing Shell History
« Reply #5 on: August 15, 2007, 09:27:27 AM »
really really good  :shock:
Only one issue is when I want to deleted the entire line hiting DEL key, the bash add ~ char

« Last Edit: August 15, 2007, 06:03:08 PM by PicsOne »