* zsh ssh host completion on OS X
@ 2006-11-17 22:52 Yi Qiang
2006-11-17 23:06 ` William Scott
0 siblings, 1 reply; 6+ messages in thread
From: Yi Qiang @ 2006-11-17 22:52 UTC (permalink / raw)
To: zsh-users
[-- Attachment #1: Type: text/plain, Size: 433 bytes --]
Hi,
I've always loved the ssh host completion feature in zsh I found on some
website. I have this in my .zshrc:
61 # complete ssh hosts
62 local _myhosts
63 _myhosts=( ${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[0-9]*}%%\
*}%%,*} )
64 zstyle ':completion:*' hosts $_myhosts
It seems to work fine on my linux box, but on OSX hitting tab doesn't do
anything.
zsh 4.2.3 (powerpc-apple-darwin8.0)
Any ideas?
Yi
[-- Attachment #2: Type: text/html, Size: 582 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: zsh ssh host completion on OS X
2006-11-17 22:52 zsh ssh host completion on OS X Yi Qiang
@ 2006-11-17 23:06 ` William Scott
2006-11-17 23:16 ` Yi Qiang
0 siblings, 1 reply; 6+ messages in thread
From: William Scott @ 2006-11-17 23:06 UTC (permalink / raw)
To: Yi Qiang; +Cc: zsh-users
Wataru Kagawa wrote a really cool OSX-specific and customizable user and
host completion for OS X.
http://murl.info/15313
Yi Qiang wrote:
> Hi,
> I've always loved the ssh host completion feature in zsh I found on some
> website. I have this in my .zshrc:
>
> 61 # complete ssh hosts
> 62 local _myhosts
> 63 _myhosts=( ${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[0-9]*}%%\
> *}%%,*} )
> 64 zstyle ':completion:*' hosts $_myhosts
>
> It seems to work fine on my linux box, but on OSX hitting tab doesn't do
> anything.
>
> zsh 4.2.3 (powerpc-apple-darwin8.0)
>
>
> Any ideas?
>
> Yi
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: zsh ssh host completion on OS X
2006-11-17 23:06 ` William Scott
@ 2006-11-17 23:16 ` Yi Qiang
2006-11-18 0:33 ` Yi Qiang
0 siblings, 1 reply; 6+ messages in thread
From: Yi Qiang @ 2006-11-17 23:16 UTC (permalink / raw)
To: William Scott, zsh-users
[-- Attachment #1: Type: text/plain, Size: 801 bytes --]
On 11/17/06, William Scott <wgscott@chemistry.ucsc.edu> wrote:
>
> Wataru Kagawa wrote a really cool OSX-specific and customizable user and
> host completion for OS X.
>
> http://murl.info/15313
Wow! I am very impressed. Awesome stuff, thanks for the link!
Cheers,
Yi
Yi Qiang wrote:
> > Hi,
> > I've always loved the ssh host completion feature in zsh I found on some
> > website. I have this in my .zshrc:
> >
> > 61 # complete ssh hosts
> > 62 local _myhosts
> > 63 _myhosts=( ${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[0-9]*}%%\
> > *}%%,*} )
> > 64 zstyle ':completion:*' hosts $_myhosts
> >
> > It seems to work fine on my linux box, but on OSX hitting tab doesn't do
> > anything.
> >
> > zsh 4.2.3 (powerpc-apple-darwin8.0)
> >
> >
> > Any ideas?
> >
> > Yi
> >
>
>
[-- Attachment #2: Type: text/html, Size: 1533 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: zsh ssh host completion on OS X
2006-11-17 23:16 ` Yi Qiang
@ 2006-11-18 0:33 ` Yi Qiang
2006-11-18 3:40 ` Bart Schaefer
0 siblings, 1 reply; 6+ messages in thread
From: Yi Qiang @ 2006-11-18 0:33 UTC (permalink / raw)
To: William Scott, zsh-users
[-- Attachment #1: Type: text/plain, Size: 2364 bytes --]
Ok, I quickly ran into the first problem. I can't seem to prevent X11 from
starting automatically when zsh starts. According to the docs this should
be the _default_ behavior. I looked in the shell scripts and can't figure
out why it is not working.
# {====>}
export open_apple_x11='skip'
# Allow a user to over-ride the default behavior by creating
a file
# with either "export open_apple_x11='skip'" or
# export open_apple_x11='use'
if [[ -f ~/.skipxrc ]];then
source ~/.skipxrc
fi
# Now open X11.app only if told to do so and it is not
already running:
if [[ open_apple_x11 != 'skip' ]];then
already_running_x11=$(ps -wwx | grep -F X11.app |
grep -v grep | head -n 1 |
awk '{print $1}')
if [[ $already_running_x11 -gt 1 ]];then
:
else
command open -a X11
if [[ $? != 0 ]];then
print ""
print "Unable to open Apple's X11.
Is it installed?"
fi
fi
For some reason...it's jumping into that if statement. I am not familiar
with shell scripting so I don't know why.
Yi
On 11/17/06, Yi Qiang <yqiang@gmail.com> wrote:
>
>
>
> On 11/17/06, William Scott <wgscott@chemistry.ucsc.edu> wrote:
> >
> > Wataru Kagawa wrote a really cool OSX-specific and customizable user and
> > host completion for OS X.
> >
> > http://murl.info/15313
>
>
> Wow! I am very impressed. Awesome stuff, thanks for the link!
>
> Cheers,
> Yi
>
> Yi Qiang wrote:
> > > Hi,
> > > I've always loved the ssh host completion feature in zsh I found on
> > some
> > > website. I have this in my .zshrc:
> > >
> > > 61 # complete ssh hosts
> > > 62 local _myhosts
> > > 63 _myhosts=(
> > ${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[0-9]*}%%\
> > > *}%%,*} )
> > > 64 zstyle ':completion:*' hosts $_myhosts
> > >
> > > It seems to work fine on my linux box, but on OSX hitting tab doesn't
> > do
> > > anything.
> > >
> > > zsh 4.2.3 (powerpc-apple-darwin8.0)
> > >
> > >
> > > Any ideas?
> > >
> > > Yi
> > >
> >
> >
>
[-- Attachment #2: Type: text/html, Size: 5919 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: zsh ssh host completion on OS X
2006-11-18 0:33 ` Yi Qiang
@ 2006-11-18 3:40 ` Bart Schaefer
2006-11-18 7:17 ` Yi Qiang
0 siblings, 1 reply; 6+ messages in thread
From: Bart Schaefer @ 2006-11-18 3:40 UTC (permalink / raw)
To: Yi Qiang, zsh-users
On Nov 17, 4:33pm, Yi Qiang wrote:
}
} if [[ -f ~/.skipxrc ]];then
} source ~/.skipxrc
} fi
Look to see if you have a file named ".skipxrc" in your home directory.
If you do, delete it.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: zsh ssh host completion on OS X
2006-11-18 3:40 ` Bart Schaefer
@ 2006-11-18 7:17 ` Yi Qiang
0 siblings, 0 replies; 6+ messages in thread
From: Yi Qiang @ 2006-11-18 7:17 UTC (permalink / raw)
To: Bart Schaefer; +Cc: zsh-users
[-- Attachment #1: Type: text/plain, Size: 369 bytes --]
Unfortunately that did not seem to work. Any other ideas?
On 11/17/06, Bart Schaefer <schaefer@brasslantern.com> wrote:
>
> On Nov 17, 4:33pm, Yi Qiang wrote:
> }
> } if [[ -f ~/.skipxrc ]];then
> } source ~/.skipxrc
> } fi
>
> Look to see if you have a file named ".skipxrc" in your home directory.
> If you do, delete it.
>
[-- Attachment #2: Type: text/html, Size: 882 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-11-18 7:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-17 22:52 zsh ssh host completion on OS X Yi Qiang
2006-11-17 23:06 ` William Scott
2006-11-17 23:16 ` Yi Qiang
2006-11-18 0:33 ` Yi Qiang
2006-11-18 3:40 ` Bart Schaefer
2006-11-18 7:17 ` Yi Qiang
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).