zsh-users
 help / color / mirror / Atom feed
* what's the point of the precommand modifier - ?
@ 2020-09-14  6:15 Marc Chantreux
  2020-09-14  6:46 ` Daniel Shahaf
  0 siblings, 1 reply; 2+ messages in thread
From: Marc Chantreux @ 2020-09-14  6:15 UTC (permalink / raw)
  To: Zsh hackers list

hello,

according to zshmisc(1):

       -      The command is executed with a `-' prepended to its argv[0] string.

ok ... but why is it useful?

regards,
marc


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

* Re: what's the point of the precommand modifier - ?
  2020-09-14  6:15 what's the point of the precommand modifier - ? Marc Chantreux
@ 2020-09-14  6:46 ` Daniel Shahaf
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Shahaf @ 2020-09-14  6:46 UTC (permalink / raw)
  To: Marc Chantreux, Zsh hackers list

Marc Chantreux wrote on Mon, 14 Sep 2020 06:15 +00:00:
> hello,
> 
> according to zshmisc(1):
> 
>        -      The command is executed with a `-' prepended to its 
> argv[0] string.
> 
> ok ... but why is it useful?

Most shells check whether their argv[0] starts with a "-", and if that's
the case, they behave as login shells (as though -l was passed).

The effect can also be achieved with ARGV0; see zshparam(1).

Cheers,

Daniel


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

end of thread, other threads:[~2020-09-14  6:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-14  6:15 what's the point of the precommand modifier - ? Marc Chantreux
2020-09-14  6:46 ` Daniel Shahaf

zsh-users

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/zsh-users

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 zsh-users zsh-users/ http://inbox.vuxu.org/zsh-users \
		zsh-users@zsh.org
	public-inbox-index zsh-users

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.users


code repositories for the project(s) associated with this inbox:

	https://git.vuxu.org/mirror/zsh/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git