On 8/31/21 6:38 PM, Ananth Chellappa wrote: > Hi Team, > Could I get some help locating portions of the code that would need > to be tweaked to add these features? > > If I had the time, I would love to get to know the code, but I have too > much going on in my real job. > > 1. Intelligent support for !$ (and related - like !2$, !-N, etc) : This > means - ignore the & at the end of the previous command.
This is part of the history library: lib/readline/histexpand.c. Keep in mind that history expansion has never worked like this, so "intelligent" is subjective. > 2. Autocomplete for !$ (and related tokens) : This means - if I have typed > !$ and now press TAB, I want the last word from the previous command > substituted on the command-line immediately. This is part of bash-specific word completion: bashline.c. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/