You are not logged in.
Why doesnt history -c doesnt work in bash as described in this page? I get the same list of commands in history either i use history, history -h or history -c. And last command i used still appends to history file. And history list doesnt return numbered lines associated with listed commands.
To override this behavior i can edit my ~/.ash_history file but if i try editing in nano (xterm) Alt+A combination doesnt work as starting markup for text selection. How to issue Alt+ commands from xterm when working in nano?
Is there a way to have fixed collection of commands collected in history for reuse?
Offline
To override this behavior i can edit my ~/.ash_history file but if i try editing in nano (xterm) Alt+A combination doesnt work as starting markup for text selection. How to issue Alt+ commands from xterm when working in nano?
I worked that out by reading Esc+Esc sequence in help. Every Alt+ command in console mode must be previously Esc and then used Alt+ command unlike the eal terminal where Esc could be omitted.
Offline
Why doesnt history -c doesnt work in bash as described in this page? I get the same list of commands in history either i use history, history -h or history -c. And last command i used still appends to history file.
You link to a man page for bash 3.0 from 2004. This is 2012 and Arch offers bash version 4.2. Try 'info bash' and search for the section on command line history. '-h' is not a valid option for the history command.
For the '-c' option, take a look at an answer I posted in a previous thread: https://bbs.archlinux.org/viewtopic.php … 7#p1097997
And history list doesnt return numbered lines associated with listed commands.
Are you saying that when you type the command, 'history', with no options, a numbered list is not printed? I certainly don't have that. If I wish to view the whole history without printing line numbers using the 'history' command, I have to pipe the output to 'cut' or 'sed' or 'awk'. Or I can send the output to a file using:
history -w hist.txtOne way to tag command lines saved in the history file is to use command line comments. I often have a pdf book that I will want to return to reading. I'll enter the command as:
mupdf ~/books/pdf/a_sale-of_two_titles.pdf 27 ## SALE pgs off by 18To return to the book I can use Ctrl-R to search through history for 'SALE', then edit the page number once the command has been recalled.
There are many good guides to using the bash history. One I liked was http://www.catonmat.net/blog/the-defini … e-history/.
Offline