<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Enable Tab Completion for SSH Aliases</title>
	<atom:link href="http://osxdaily.com/2011/04/06/enable-tab-completion-for-ssh-aliases/feed/" rel="self" type="application/rss+xml" />
	<link>http://osxdaily.com/2011/04/06/enable-tab-completion-for-ssh-aliases/</link>
	<description>News, tips, software, reviews, and more for Mac OS X, iPhone, iPad</description>
	<lastBuildDate>Sun, 19 May 2013 22:41:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Kim</title>
		<link>http://osxdaily.com/2011/04/06/enable-tab-completion-for-ssh-aliases/#comment-363352</link>
		<dc:creator>Kim</dc:creator>
		<pubDate>Fri, 23 Mar 2012 16:11:19 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=14587#comment-363352</guid>
		<description>hey there... i&#039;m quite late.. but i also got in some troubles while configuring this on my macbook pro (lion)

so.. just check if your local .bashrc is even called! (try with echo &quot;hi&quot; or something similar) 

if not, insert this in /etc/profile right after the /etc/bashrc-call: 

[ -r $HOME/.bashrc ] &amp;&amp; source $HOME/.bashrc

(or just write it in the global /etc/bashrc)</description>
		<content:encoded><![CDATA[<p>hey there&#8230; i&#8217;m quite late.. but i also got in some troubles while configuring this on my macbook pro (lion)</p>
<p>so.. just check if your local .bashrc is even called! (try with echo &#8220;hi&#8221; or something similar) </p>
<p>if not, insert this in /etc/profile right after the /etc/bashrc-call: </p>
<p>[ -r $HOME/.bashrc ] &amp;&amp; source $HOME/.bashrc</p>
<p>(or just write it in the global /etc/bashrc)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lucca Mordente</title>
		<link>http://osxdaily.com/2011/04/06/enable-tab-completion-for-ssh-aliases/#comment-232839</link>
		<dc:creator>Lucca Mordente</dc:creator>
		<pubDate>Tue, 06 Sep 2011 18:41:10 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=14587#comment-232839</guid>
		<description>What error did you get?</description>
		<content:encoded><![CDATA[<p>What error did you get?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ahmet alp balkan</title>
		<link>http://osxdaily.com/2011/04/06/enable-tab-completion-for-ssh-aliases/#comment-223452</link>
		<dc:creator>ahmet alp balkan</dc:creator>
		<pubDate>Mon, 15 Aug 2011 09:43:40 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=14587#comment-223452</guid>
		<description>none of the above works without errors. tried them all.</description>
		<content:encoded><![CDATA[<p>none of the above works without errors. tried them all.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cliff</title>
		<link>http://osxdaily.com/2011/04/06/enable-tab-completion-for-ssh-aliases/#comment-189447</link>
		<dc:creator>Cliff</dc:creator>
		<pubDate>Fri, 08 Apr 2011 17:01:36 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=14587#comment-189447</guid>
		<description>I&#039;d prefer to use bash but this does not work for me</description>
		<content:encoded><![CDATA[<p>I&#8217;d prefer to use bash but this does not work for me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MetalRufflez</title>
		<link>http://osxdaily.com/2011/04/06/enable-tab-completion-for-ssh-aliases/#comment-189407</link>
		<dc:creator>MetalRufflez</dc:creator>
		<pubDate>Fri, 08 Apr 2011 14:15:02 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=14587#comment-189407</guid>
		<description>You can simplify even mor the awk command:
complete -o default -o nospace -W &quot;$(awk &#039;/^Host / {print $2}&#039; &lt; $HOME/.ssh/config) scp sftp ssh</description>
		<content:encoded><![CDATA[<p>You can simplify even mor the awk command:<br />
complete -o default -o nospace -W &#8220;$(awk &#8216;/^Host / {print $2}&#8217; &lt; $HOME/.ssh/config) scp sftp ssh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lucca Mordente</title>
		<link>http://osxdaily.com/2011/04/06/enable-tab-completion-for-ssh-aliases/#comment-189070</link>
		<dc:creator>Lucca Mordente</dc:creator>
		<pubDate>Thu, 07 Apr 2011 13:25:45 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=14587#comment-189070</guid>
		<description>I mean:

complete -o default -o nospace -W &quot;$(/usr/bin/env ruby -ne &#039;puts $_.split(/[,\s]+/)[1..-1].reject{&#124;host&#124; host.match(/\*&#124;\?/)} if $_.match(/\s*Host\s+/);&#039; &lt; $HOME/.ssh/config)&quot; scp sftp ssh

remember to replace the quotes :)</description>
		<content:encoded><![CDATA[<p>I mean:</p>
<p>complete -o default -o nospace -W &#8220;$(/usr/bin/env ruby -ne &#8216;puts $_.split(/[,\s]+/)[1..-1].reject{|host| host.match(/\*|\?/)} if $_.match(/\s*Host\s+/);&#8217; &lt; $HOME/.ssh/config)&quot; scp sftp ssh</p>
<p>remember to replace the quotes <img src='http://cdn.osxdaily.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lucca Mordente</title>
		<link>http://osxdaily.com/2011/04/06/enable-tab-completion-for-ssh-aliases/#comment-189069</link>
		<dc:creator>Lucca Mordente</dc:creator>
		<pubDate>Thu, 07 Apr 2011 13:23:23 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=14587#comment-189069</guid>
		<description>Here is the correct command:

/usr/bin/env ruby -ne &#039;puts $_.split(/[,\s]+/)[1..-1].reject{&#124;host&#124; host.match(/\*&#124;\?/)} if $_.match(/\s*Host\s+/);&#039; &lt; $HOME/.ssh/config</description>
		<content:encoded><![CDATA[<p>Here is the correct command:</p>
<p>/usr/bin/env ruby -ne &#8216;puts $_.split(/[,\s]+/)[1..-1].reject{|host| host.match(/\*|\?/)} if $_.match(/\s*Host\s+/);&#8217; &lt; $HOME/.ssh/config</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://osxdaily.com/2011/04/06/enable-tab-completion-for-ssh-aliases/#comment-189062</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Thu, 07 Apr 2011 13:01:59 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=14587#comment-189062</guid>
		<description>Awk variant (combining greps and cut into one system call), accepting multiple hostnames on the Host line in the config:

        complete -o default -o nospace -W &quot;$(awk &#039;/^Host / {sub(&quot;^Host &quot;, &quot;&quot;); print $0;}&#039; &lt; $HOME/.ssh/config)&quot; scp sftp ssh

(I don&#039;t have ruby installed either).</description>
		<content:encoded><![CDATA[<p>Awk variant (combining greps and cut into one system call), accepting multiple hostnames on the Host line in the config:</p>
<p>        complete -o default -o nospace -W &#8220;$(awk &#8216;/^Host / {sub(&#8220;^Host &#8220;, &#8220;&#8221;); print $0;}&#8217; &lt; $HOME/.ssh/config)&quot; scp sftp ssh</p>
<p>(I don&#039;t have ruby installed either).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lkuty</title>
		<link>http://osxdaily.com/2011/04/06/enable-tab-completion-for-ssh-aliases/#comment-189034</link>
		<dc:creator>lkuty</dc:creator>
		<pubDate>Thu, 07 Apr 2011 09:43:00 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=14587#comment-189034</guid>
		<description>Backslashes have disappeared.

Before s (3 of them), *, ? in regular expressions above we need a backslash.</description>
		<content:encoded><![CDATA[<p>Backslashes have disappeared.</p>
<p>Before s (3 of them), *, ? in regular expressions above we need a backslash.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://osxdaily.com/2011/04/06/enable-tab-completion-for-ssh-aliases/#comment-188995</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Thu, 07 Apr 2011 04:23:25 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=14587#comment-188995</guid>
		<description>You can also set this up easily in your .bash_profile to use the values in your /etc/hosts file:

complete -A hostname ftp sftp ssh</description>
		<content:encoded><![CDATA[<p>You can also set this up easily in your .bash_profile to use the values in your /etc/hosts file:</p>
<p>complete -A hostname ftp sftp ssh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin</title>
		<link>http://osxdaily.com/2011/04/06/enable-tab-completion-for-ssh-aliases/#comment-188952</link>
		<dc:creator>Justin</dc:creator>
		<pubDate>Wed, 06 Apr 2011 23:10:28 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=14587#comment-188952</guid>
		<description>sigh. that should be 


complete -o default -o nospace -W “$(grep “^Host” $HOME/.ssh/config &#124; grep -v &quot;[?*]&quot; &#124; cut -d” ” -f2)” scp sftp ssh</description>
		<content:encoded><![CDATA[<p>sigh. that should be </p>
<p>complete -o default -o nospace -W “$(grep “^Host” $HOME/.ssh/config | grep -v &#8220;[?*]&#8221; | cut -d” ” -f2)” scp sftp ssh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin</title>
		<link>http://osxdaily.com/2011/04/06/enable-tab-completion-for-ssh-aliases/#comment-188951</link>
		<dc:creator>Justin</dc:creator>
		<pubDate>Wed, 06 Apr 2011 23:09:09 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=14587#comment-188951</guid>
		<description>Thanks! I added a filter to exclude the wildcard entries i have in my config:

complete -o default -o nospace -W “$(grep “^Host” $HOME/.ssh/config &#124; grep -v &#039;[?*] &#124; cut -d” ” -f2)” scp sftp ssh</description>
		<content:encoded><![CDATA[<p>Thanks! I added a filter to exclude the wildcard entries i have in my config:</p>
<p>complete -o default -o nospace -W “$(grep “^Host” $HOME/.ssh/config | grep -v &#8216;[?*] | cut -d” ” -f2)” scp sftp ssh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MetalRufflez</title>
		<link>http://osxdaily.com/2011/04/06/enable-tab-completion-for-ssh-aliases/#comment-188889</link>
		<dc:creator>MetalRufflez</dc:creator>
		<pubDate>Wed, 06 Apr 2011 16:25:26 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=14587#comment-188889</guid>
		<description>Bro, why use ruby if you can use bash, its WAY easier and works in every *nix

complete -o default -o nospace -W &quot;$(grep &quot;^Host&quot; $HOME/.ssh/config &#124; cut -d&quot; &quot; -f2)&quot; scp sftp ssh</description>
		<content:encoded><![CDATA[<p>Bro, why use ruby if you can use bash, its WAY easier and works in every *nix</p>
<p>complete -o default -o nospace -W &#8220;$(grep &#8220;^Host&#8221; $HOME/.ssh/config | cut -d&#8221; &#8221; -f2)&#8221; scp sftp ssh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: luca</title>
		<link>http://osxdaily.com/2011/04/06/enable-tab-completion-for-ssh-aliases/#comment-188872</link>
		<dc:creator>luca</dc:creator>
		<pubDate>Wed, 06 Apr 2011 15:27:17 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=14587#comment-188872</guid>
		<description>it&#039;s easier if you just need to alias one single host, as you&#039;re aliasing the whole command
instead, with the regular expression, you&#039;ll be able to use a whole catalogue of aliases as you&#039;re aliasing just the host-side of the ssh-command.</description>
		<content:encoded><![CDATA[<p>it&#8217;s easier if you just need to alias one single host, as you&#8217;re aliasing the whole command<br />
instead, with the regular expression, you&#8217;ll be able to use a whole catalogue of aliases as you&#8217;re aliasing just the host-side of the ssh-command.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tavis</title>
		<link>http://osxdaily.com/2011/04/06/enable-tab-completion-for-ssh-aliases/#comment-188869</link>
		<dc:creator>Tavis</dc:creator>
		<pubDate>Wed, 06 Apr 2011 15:16:10 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=14587#comment-188869</guid>
		<description>Nice trick but you can also just use aliasing:

alias connect=&#039;ssh name@server&#039;

Then all you have to type is &#039;connect&#039; isn&#039;t that easier than all this?</description>
		<content:encoded><![CDATA[<p>Nice trick but you can also just use aliasing:</p>
<p>alias connect=&#8217;ssh name@server&#8217;</p>
<p>Then all you have to type is &#8216;connect&#8217; isn&#8217;t that easier than all this?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced (User agent is rejected)
Database Caching 1/3 queries in 0.003 seconds using disk: basic
Object Caching 347/348 objects using disk: basic
Content Delivery Network via cdn.osxdaily.com

Served from: osxdaily.com @ 2013-05-19 19:06:34 -->