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

Re: Anyone familiar with auto-fu.zsh project?

On 13 June 2018 at 11:17, dana <dana@xxxxxxx> wrote:
> On 13 Jun 2018, at 03:28, Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx> wrote:
>>Wonder why ":" is needed, to gettpid be not the last command.
> Presumably because zsh optimises out the fork() for the last command.

But how to run a binary without forking first? I would have to be
`exec getppid`.

> Anyway i don't actually think you should use that, lol. If you really don't have
> zsh/system you should be able to use ${${:-/proc/self}:A:t} on Linux (and NetBSD
> and Solaris). I bet that covers 99% of users — i doubt many people are using
> static zsh on Macs for example.

Procfs is nice but lives in a word of cats, echos, ls -l – I mean,
it's a world of text, files and symlinks. IMO it is good to allow
users cat etc. it from interactive command line, but for short
programs, it's like taking away coherency from them, they have to open
a channel for this file tree, I feel this is unstable.

Best regards,
Sebastian Gniazdowski

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