I can't see why the hostname extraction wouldn't work either.

However, I did notice something odd when looking at this. The command
that does the extraction seems to be broken--it generates "host" and
"hostname" as completions. The suspect line (from
__fish_print_hostnames.fish) is:

  sgrep -Eoi '^ *host[^*]*$' ~/.ssh/config | cut -d '=' -f 2 | tr ' ' '\n'

Is there any reason for = to be used as a delimiter there? I don't
think = is a valid/useful character in ssh_config(5) files. I made a
pull request to fix this (and another minor thing) at:

https://github.com/fish-shell/fish-shell/pull/1260





Michael

On Fri, Jan 24, 2014 at 9:38 AM, Yvon Thoraval <yvon.thora...@gmail.com> wrote:
> I'm using fish and ssh on Mac OS X Mountain Lion and Mavericks without any
> prob as U've mentionned.
> and also the addresses are IPV6.
>
> my ~/.ssh/config :
>
> .-[yt@d620.local:~]-[10:34:51]
> '->$ cat .ssh/config
> Host Gericom
> User yt
> Hostname  2a01:< ... >:a07b
>
> Host iMac
> User yt
> Hostname  2a01::< ... >:721d
>
> Host iMac-wifi
> User yt
> Hostname  2a01::< ... >:2559
>
> may be your prob would be only due to indentation ?
>
>
>
>
>
> 2014/1/23 Stefan Hellmann <hellm...@pcspinnt.de>
>>
>> On Thu, Jan 23, 2014 at 02:09:20PM +0000, Michael Stillwell wrote:
>>>
>>> Hostname completion on ~/.ssh/config should work. e.g.
>>>
>>>  $ ssh br[tab]
>>>
>>
>> Jep and thats the problem. This ist my .ssh/config:
>>
>> host    homeserver
>>      Hostname        192.168.1.2
>>      User            shellmann
>>      IdentityFile    ~/.ssh/id_rsa_work
>>
>> host    publicserver
>>      Hostname        75.39.47.2
>>      User            root
>>      IdentityFile    ~/.ssh/id_rsa_work
>>
>>
>> The completion only tooks the hostname. The host is ignored.
>>
>> The bash completion for example uses the host. My .ssh/config file
>> contains round about 100 entries. So it's hard to remember these IPs and
>> cryptical hostnames.
>>
>>
>>> I'm not entirely sure how it's all hooked together, but you might like
>>> to check that
>>>
>>>  $ __fish_print_hostnames
>>>
>>> outputs hostnames (or aliases) from your ~/.ssh/config? It's defined in
>>>
>>> /usr/local/share/fish/functions/__fish_print_hostnames.fish
>>>
>>> (This function is used by completions/ssh.fish.)
>>>
>>>
>>>
>>>
>>> Michael
>>>
>>> On Thu, Jan 23, 2014 at 1:12 PM, Stefan Hellmann <hellm...@pcspinnt.de>
>>> wrote:
>>>>
>>>> Hello everyone,
>>>>
>>>> i wonder that fish only completes hostnames and ignores my .ssh/config
>>>> with the ssh command.
>>>>
>>>> Is there a way to force fish to read my .ssh/config ?
>>>>
>>>> I'm new to fish and did some google search but didn't found anything.
>>>>
>>>> --
>>>> Mit freundlichen Grüßen
>>>>
>>>> Stefan Hellmann
>>>>
>>>> hellm...@pcspinnt.de
>>>> http://www.pcspinnt.de
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
>>>> Learn Why More Businesses Are Choosing CenturyLink Cloud For
>>>> Critical Workloads, Development Environments & Everything In Between.
>>>> Get a Quote or Start a Free Trial Today.
>>>>
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Fish-users mailing list
>>>> Fish-users@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/fish-users
>>>>
>>
>> --
>> Mit freundlichen Grüßen
>>
>> Stefan Hellmann
>>
>> hellm...@pcspinnt.de
>> http://www.pcspinnt.de
>>
>>
>> ------------------------------------------------------------------------------
>> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
>> Learn Why More Businesses Are Choosing CenturyLink Cloud For
>> Critical Workloads, Development Environments & Everything In Between.
>> Get a Quote or Start a Free Trial Today.
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Fish-users mailing list
>> Fish-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/fish-users
>>
>
>
>
> --
> Yvon@48.871651804,2.384858688
>
>
> ------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> _______________________________________________
> Fish-users mailing list
> Fish-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fish-users
>

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to