* [newbie] bash-like feature - autocompletion problem
@ 2003-01-24 18:57 Petre Bandac
[not found] ` <11265.1043664899@finches.logica.co.uk>
2003-01-29 23:02 ` Deborah Ariel Pickett
0 siblings, 2 replies; 3+ messages in thread
From: Petre Bandac @ 2003-01-24 18:57 UTC (permalink / raw)
To: ZSH User List
hello
I have switched to zsh with the installation of a freebsd workstation @ home;
among others, I have the following problem:
on my linux machine (bash-2.5) I have added one entry in /etc/hosts stating
192.168.0.1 host1 - which helped me when ssh-ing (just typing ssh root@h[TAB]
and I got the host1 completed)
here, using zsh, I tried to do the same, but I get something like:
[petre@kgb]$ more /etc/hosts | grep cockeru
192.168.108.176 cockeru
[petre@kgb]$ ssh root@coc
No matches for: `remote host name', `host', or `corrections'
I'm using
[petre@kgb]$ zsh --version
zsh 4.0.6 (i386-portbld-freebsd4.7)
where and what should I modify ?
thanks,
petre
--
Login: petre Name: Petre Bandac
Directory: /home/petre Shell: /usr/local/bin/zsh
On since Fri Jan 24 10:25 (EET) on ttyv0, idle 10:21 (messages off)
On since Fri Jan 24 10:40 (EET) on ttyp0, idle 0:12, from :0
On since Fri Jan 24 11:24 (EET) on ttyp1, idle 0:32, from :0
On since Fri Jan 24 17:57 (EET) on ttyp2, idle 0:38, from :0
On since Fri Jan 24 18:35 (EET) on ttyp3, idle 2:09, from :0
On since Fri Jan 24 19:00 (EET) on ttyp4, idle 0:13, from :0
No Mail.
No Plan.
^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <11265.1043664899@finches.logica.co.uk>]
* Re: [newbie] bash-like feature - autocompletion problem
2003-01-24 18:57 [newbie] bash-like feature - autocompletion problem Petre Bandac
[not found] ` <11265.1043664899@finches.logica.co.uk>
@ 2003-01-29 23:02 ` Deborah Ariel Pickett
1 sibling, 0 replies; 3+ messages in thread
From: Deborah Ariel Pickett @ 2003-01-29 23:02 UTC (permalink / raw)
To: petre; +Cc: ZSH User List
> I have switched to zsh with the installation of a freebsd workstation @ home;
> among others, I have the following problem:
> on my linux machine (bash-2.5) I have added one entry in /etc/hosts stating
> 192.168.0.1 host1 - which helped me when ssh-ing (just typing ssh root@h[TAB]
> and I got the host1 completed)
> here, using zsh, I tried to do the same, but I get something like:
> [petre@kgb]$ more /etc/hosts | grep cockeru
> 192.168.108.176 cockeru
> [petre@kgb]$ ssh root@coc
> No matches for: `remote host name', `host', or `corrections'
> I'm using
> [petre@kgb]$ zsh --version
> zsh 4.0.6 (i386-portbld-freebsd4.7)
> where and what should I modify ?
Here's a little fragment of my .zshrc:
zstyle ':completion:*' hosts `\
[[ -f ~/.hosts ]] &&
sed 's/ .*$//' < ~/.hosts;
[[ -f ~/.rhosts ]] &&
sed 's/ .*$//' < ~/.rhosts`
The whole bit between the `...` is just a sed script which grabs
hostnames from various files. The newer (non-compctl) zsh completion
system seems to make use of a style. If you don't set that style with a
zstyle command, zsh can't guess what your hosts are. It seems that zsh
doesn't pick any files by default for a list of hostnames.
I'd say that in your situation you'd want to do something like
zstyle ':completion:*' hosts `cat /etc/hosts`
(or fancier versions which I'm sure others here will suggest that don't
use cat or sed) in your .zshrc.
Let me know how it goes.
--
Debbie Pickett http://www.csse.monash.edu.au/~debbiep debbiep@csse.monash.edu.au
"Beaujolais goes straight to my head, beaujolais puts me to shame, And I don't
know why I'm in this place or how I came." - _Beaujolais_, The Alan Parsons
Project
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-01-29 23:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-24 18:57 [newbie] bash-like feature - autocompletion problem Petre Bandac
[not found] ` <11265.1043664899@finches.logica.co.uk>
[not found] ` <200301272332.12295.petre@kgb.ro>
2003-01-29 10:47 ` Oliver Kiddle
2003-01-29 23:02 ` Deborah Ariel Pickett
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).