Running is therapy

a blog about running, cats and Linux.
  • Home
  • Current Schedule
  • Personal Records
  • Upcoming Races

Add nmap to the bash-completion fun

Published by Nathan Powell on February 28, 2008 01:34 pm under computers

Find this line in /etc/bash_completion:

complete -F _known_hosts traceroute traceroute6 tracepath tracepath6 \
        ping fping telnet host nslookup rsh rlogin ftp dig ssh-installkeys mtr

Add the word nmap to the end of that list.

3 Comments so far

  1. Don Spidell on February 28th, 2008

    You people and your bash completion, tabbed browser windows, and ssh keys. What’s next? Non-volatile memory? Some kind of visual device so you can see what you’re typing? Gah… no one does things the old fashioned way anymore.

  2. Bob Igo on February 28th, 2008

    So … what is this supposed to do? Re-running bash after the change and typing ‘nmap [tab]’ gave me a bizarre list of things that look nothing like stuff I’d use as parameters to nmap.

  3. Nathan Powell on February 28th, 2008

    Bob,

    Well, in theory it should read your ~/.ssh/known_hosts file and use the ip’s and domain names contained in there. Unfortunately Ubuntu’s default config makes this difficult. For this to work well, you have to make your /etc/ssh/ssh_config look like:

    HashKnownHosts no

    Otherwise, ssh makes all the hostnames/ip’s hashes. Which aren’t as useful in this context.

Posting your comment.

  • Search

  • Archives

    • August 2008 (7)
    • July 2008 (11)
    • June 2008 (14)
    • May 2008 (15)
    • April 2008 (10)
    • March 2008 (16)
    • February 2008 (17)
    • January 2008 (37)
    • December 2007 (21)
    • November 2007 (30)
    • October 2007 (29)
    • September 2007 (22)
    • August 2007 (30)
    • July 2007 (49)
    • June 2007 (32)
    • May 2007 (29)
    • April 2007 (38)
    • March 2007 (26)
    • February 2007 (25)
    • January 2007 (23)
    • December 2006 (10)
    • November 2006 (12)
    • October 2006 (9)
    • September 2006 (9)
    • August 2006 (5)
    • July 2006 (13)
    • June 2006 (9)
    • May 2006 (8)
    • April 2006 (11)
    • March 2006 (12)
    • February 2006 (12)
    • January 2006 (13)
    • December 2005 (15)
    • November 2005 (19)
    • October 2005 (8)
  • Categories

    • blather (60)
    • books (10)
    • computers (177)
    • cooking (1)
    • economics (3)
    • emacs (3)
    • football (1)
    • gaming (1)
    • hiking (5)
    • housekeeping (5)
    • lifehacking (7)
    • music (3)
    • paddling (2)
    • personal (1)
    • politics (21)
    • programming (67)
    • running (228)
    • smoking (40)
    • sysadmin (9)
    • tlc (10)
    • Uncategorized (1)
  • Pages

    • Current Schedule
    • Personal Records
    • Upcoming Races

Copyright © 2008 Running is therapy
WordPress Theme based on Light Theme