zsh-users
 help / color / mirror / code / Atom feed
* process completion
@ 2001-03-20 17:20 Jeff Shipman
  2001-03-20 22:50 ` Oliver Kiddle
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Shipman @ 2001-03-20 17:20 UTC (permalink / raw)
  To: zsh-users

At home I'm using zsh 3.1.6 and I have process
completion like the following:

shippy@neptune:~> kill 82<TAB>
 8212 ttyp0    00:00:00 zsh
 8253 ttyp0    00:00:00 zsh
 8254 ttyp0    00:00:00 ps

I really like how aligned it is and shows you
the name of the process. However, at work I'm
using the example compctl file downloaded from
zsh.org, and I get something like this:

jeff@reznor:~> kill -9 <TAB>
1700   1782   1783   1784   28628  31806

The line that does this in the compctl file
at my work is:

# kill takes signal names as the first argument after -, but job names after %
# or PIDs as a last resort
compctl -j -P '%' + -s '`ps -a | tail +2 | cut -c1-5`' + \
        -x 's[-] p[1]' -k "($signals[1,-3])" -- kill

At home, however, I cannot seem to find a file that
has this defined and typing 'compctl' doesn't show
anything for kill. I like the behavior that I get at
home better. Is this something that's built into
zsh? If so, how can I get it at work?

BTW, at home I'm using 3.1.6 and at work I'm using 3.1.9.
Thanks in advance.

Jeff "Shippy" Shipman     E-Mail: shippy@nmt.edu
Computer Science Major    ICQ: 1786493
New Mexico Institute of Mining and Technology
Homepage: http://www.nmt.edu/~shippy


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: process completion
  2001-03-20 17:20 process completion Jeff Shipman
@ 2001-03-20 22:50 ` Oliver Kiddle
  2001-03-21  0:19   ` Jeff Shipman
  0 siblings, 1 reply; 4+ messages in thread
From: Oliver Kiddle @ 2001-03-20 22:50 UTC (permalink / raw)
  To: Jeff Shipman; +Cc: zsh-users

Jeff Shipman wrote:
> 
> At home I'm using zsh 3.1.6 and I have process
> completion like the following:

> I really like how aligned it is and shows you
> the name of the process. However, at work I'm
> using the example compctl file downloaded from

> BTW, at home I'm using 3.1.6 and at work I'm using 3.1.9.
> Thanks in advance.

The nicely aligned process list is the default way processes are
completed using the new style completion. If you are using the new style
at home it is probably because you are using a Linux distribution where
they have enabled it by default. It is enabled with the following two
lines:

	autoload -U compinit
	compinit

which you will probably find at home are either in your .zshrc or
somewhere like /etc/zshrc.

What I would recommend you do is enable new-style completion at work.
The easiest way to do this is with:
	autoload -U compinstall
	compinstall

This will add the compinit lines and let you do some basic
configuration.

You may also need to remove your compctl commands. You'll find that the
new-style completion is much better in many areas and it is set up to
complete many commands already which will save you the trouble of
writing compctls.

If you don't want the new completion, it should be possible to do the
aligned process completion with compctl.

Oliver


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: process completion
  2001-03-20 22:50 ` Oliver Kiddle
@ 2001-03-21  0:19   ` Jeff Shipman
  2001-03-21  9:42     ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Shipman @ 2001-03-21  0:19 UTC (permalink / raw)
  To: Oliver Kiddle; +Cc: zsh-users

> The nicely aligned process list is the default way processes are
> completed using the new style completion. If you are using the new style
> at home it is probably because you are using a Linux distribution where
> they have enabled it by default. It is enabled with the following two
> lines:
>
> 	autoload -U compinit
> 	compinit
>

When I do that, I get the following error:

compinit:20: compinit: function definition file not found

I compiled zsh with --disable-dynamic so shouldn't
it have everything it already needs? Or is there
something else I'm forgetting to do?

Jeff "Shippy" Shipman     E-Mail: shippy@nmt.edu
Computer Science Major    ICQ: 1786493
New Mexico Institute of Mining and Technology
Homepage: http://www.nmt.edu/~shippy


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: process completion
  2001-03-21  0:19   ` Jeff Shipman
@ 2001-03-21  9:42     ` Bart Schaefer
  0 siblings, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 2001-03-21  9:42 UTC (permalink / raw)
  To: zsh-users

On Mar 20,  5:19pm, Jeff Shipman wrote:
} Subject: Re: process completion
}
} > 	autoload -U compinit
} > 	compinit
} 
} When I do that, I get the following error:
} 
} compinit:20: compinit: function definition file not found
} 
} I compiled zsh with --disable-dynamic so shouldn't
} it have everything it already needs?

The new completion system is written as shell functions, not (entirely)
in C, so the C library linkage has nothing to do with whether you can
load a function definition.

} Or is there something else I'm forgetting to do?

The default setting of the fpath parameter *should* point to the right
places, unless (for example) you have a .zshrc file from an older version
of zsh that is stomping on it.

When you compiled, did you run "make install" successfully?

In any case, you'll need to be sure that your fpath includes all of the
directories that have the completion function files.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-03-21  9:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-20 17:20 process completion Jeff Shipman
2001-03-20 22:50 ` Oliver Kiddle
2001-03-21  0:19   ` Jeff Shipman
2001-03-21  9:42     ` Bart Schaefer

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).