Mac OS X 10.11.4: Terminal.app should permit faving a command line

Originator:kusterer
Number:rdar://26216828 Date Originated:11-May-2016 10:14 AM
Status:Open Resolved:
Product:OS X Product Version:Mac OS X 10.11.4 (15E65)
Classification:Feature (New) Reproducible:Not Applicable
 
Terminal.app keeps a history of commands typed in. Often, this history contains mis-typed lines, ones with missing parameters etc. OTOH I run some commands every month, so they're always far away in the history, but they're not complex enough to create a dedicated shell script for them (like undoing the last commit in Git, or whatever).

It would be great if Terminal.app allowed favoriting items in the history. I suppose that would require a special variant of readline and similar libraries, but I presume Terminal already has that, given it can draw these little grey brackets next to old prompts these days.

How favoriting could work:
1. There'd be an asterisk next to the command prompt.
2. Clicking that asterisk turns it from outline to solid, to indicate this line is favorited. Clicking it again would undo the favoriting.
3. Favorited lines get inserted into the history, say, after the 3 most recent items, or maybe even at the very start.
4. Paging through the history (e.g. using arrow-up/down) would also update the asterisk to indicate if a line is a favorite or not. Clicking that arrow would then un-favorite or favorite that history entry.

Would be very handy for that kind of little snippet, and a fairly self-explanatory UI.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!