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

Re: [PATCH] new function to complete names of running process (and three example usage)



On 20 Jun 2018, at 07:30, Jun T <takimoto-j@xxxxxxxxxxxxxxxxx> wrote:
>_process_names completes names of running processes.

Solaris ps doesn't support BSD-style options (it needs -o rather than o), but if
you account for that it should work as intended there.

btw, this method of getting the process names seems fine for most tools on
macOS, but there might be trouble elsewhere. For example, it's tempting to have
pgrep/pkill use it, but on Linux they specifically *want* that truncated 'comm'
name (unless -f is used). If the function is ever used for other tools it might
need to learn some extra options to control how it gets the names.

On 20 Jun 2018, at 07:30, Jun T <takimoto-j@xxxxxxxxxxxxxxxxx> wrote:
>I wrote this for using it from three new completions for macOS-specific commands
>dtruss

dtruss isn't Mac-specific. It was originally written for Solaris, and is also
available on *BSD. It should probably go under Unix i think.

dana



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