[NTLUG:Discuss] Bash command line completion

Leroy Tennison leroy.tennison at verizon.net
Thu Jun 9 23:31:08 GMT+5 2016


I'm looking for a way to recover only the first few words of the 
immediately previous command.  For example,given the below

     ip route delete 192.168.100.0/24 dev eth0

I want to easily repeat

     ip route delete

so I can copy/paste additional routes from the output of 'ip route' 
(working with a firewall which has 10 interfaces, doing testing).

I realize I could write an alias but was hoping for something more 
direct, either I'm not searching for the right thing or the web isn't 
being helpful, ideas?



More information about the Discuss mailing list