Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh ssh host completion on OS X



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@xxxxxxxxx> wrote:


On 11/17/06, William Scott < wgscott@xxxxxxxxxxxxxxxxxx> 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
>





Messages sorted by: Reverse Date, Date, Thread, Author