zsh-users
 help / color / mirror / code / Atom feed
* zsh completer for ps, procees viewer
@ 2013-03-02  4:50 joe M
  2013-03-02  6:11 ` Tomasz Pala
  2013-03-02  7:52 ` Phil Pennock
  0 siblings, 2 replies; 3+ messages in thread
From: joe M @ 2013-03-02  4:50 UTC (permalink / raw)
  To: zsh-users

Hello,

On my gentoo system, I notice that _ps is the below and does not show
the options for ps, the process viewer.

which _ps
_ps () {
        local expl ext=''
        if [[ "$1" = '-z' ]]
        then
                ext='(|.bz2|.gz|.Z)'
                shift
        fi
        _description files expl 'PostScript file'
        _files "$@" "$expl[@]" -g "*.(#i)(ps|eps)$ext(-.)"
}
_ps is a shell function
_ps:

Just wanted to check if it is the same across other distros.

It is located at /usr/share/zsh/5.0.2/functions/Completion/Unix/_ps in
my system.

Is there a completion file for ps, the process viewer, floating around?

Thanks
Joe


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

* Re: zsh completer for ps, procees viewer
  2013-03-02  4:50 zsh completer for ps, procees viewer joe M
@ 2013-03-02  6:11 ` Tomasz Pala
  2013-03-02  7:52 ` Phil Pennock
  1 sibling, 0 replies; 3+ messages in thread
From: Tomasz Pala @ 2013-03-02  6:11 UTC (permalink / raw)
  To: zsh-users

On Fri, Mar 01, 2013 at 23:50:18 -0500, joe M wrote:

> On my gentoo system, I notice that _ps is the below and does not show
> the options for ps, the process viewer.
[...]
> Just wanted to check if it is the same across other distros.
> 
> It is located at /usr/share/zsh/5.0.2/functions/Completion/Unix/_ps in
> my system.

This is postscript files handler.

> Is there a completion file for ps, the process viewer, floating around?

Who needs one? ps command varies so much between different Unix systems
that it makes no sense (due to huge effort) to write one. There is _pids
completion attached to various commands (kill, strace, lsof, gdb,
ulimit).

-- 
Tomasz Pala <gotar@pld-linux.org>


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

* Re: zsh completer for ps, procees viewer
  2013-03-02  4:50 zsh completer for ps, procees viewer joe M
  2013-03-02  6:11 ` Tomasz Pala
@ 2013-03-02  7:52 ` Phil Pennock
  1 sibling, 0 replies; 3+ messages in thread
From: Phil Pennock @ 2013-03-02  7:52 UTC (permalink / raw)
  To: joe M; +Cc: zsh-users

On 2013-03-01 at 23:50 -0500, joe M wrote:
> It is located at /usr/share/zsh/5.0.2/functions/Completion/Unix/_ps in
> my system.
> 
> Is there a completion file for ps, the process viewer, floating around?

Yes, it's in the Solaris/ sub-directory, which normally comes first in
$fpath and so is used in preference to the Unix/ one, even on BSD
systems.

As to _why_ it's Solaris/_ps for ps(1) and Unix/_ps for handling
postscript: I do not know.

If your OS has stripped the Solaris/ items, then you're missing
completions for gcore, ptree and others, not just the real ps(1)
completions.

Oh, and the Solaris/_ps only handles ps options with a dash, but even
BSDs take those variants these days.

-Phil


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

end of thread, other threads:[~2013-03-02  8:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-02  4:50 zsh completer for ps, procees viewer joe M
2013-03-02  6:11 ` Tomasz Pala
2013-03-02  7:52 ` Phil Pennock

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