Re: .unixCmd

miguel.negrao-lists-/wLt9BB+Iy41Tgt60Rntydi2O/[email protected]
Newsgroups gmane.comp.audio.supercollider.user
Message-ID <[email protected]>
Hi,

Às 10:01 de 23/03/21, [email protected] escreveu:
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Tuesday, March 23, 2021 10:39 AM, <miguel.negrao-lists-/wLt9BB+Iy41Tgt60Rntydi2O/[email protected]> wrote:
> 
>> Hi,
>>
>> As a solution, one can use absolute paths, e.g. /usr/bin/telnet or read
>> the PATH from a file using ".":
> 
> As far as I'm able to tell, hardcoding paths this way is much less portable than modifying the PATH env on startup and relying on others to do the same for their systems as needed.
> 
>> Also unixCmd I belive calls /bin/sh which in according to this email
>> thread calls zsh. man page for zsh says:
> 
> Yes, unixCmd more or less runs `/bin/sh -c "$@"`, but that is not necessarily invoking zsh. The man page for sh says:
> 
>       sh is a POSIX-compliant command interpreter (shell).  It is implemented by re-execing as either
>       bash(1), dash(1), or zsh(1) as determined by the symbolic link located at /private/var/select/sh.  If
>       /private/var/select/sh does not exist or does not point to a valid shell, sh will use one of the sup-
>       ported shells.
> 
> On my system, and on anyone else's who prefers it, this is bash.

Should have been more precise, I meant that it appears that since MacOS 
catalina the default shell is zsh.

https://support.apple.com/en-us/HT208050

But as you pointed out, this can be changed.

> 
>>
>> "Commands are then read from $ZDOTDIR/.zshenv. If the shell is a login
>> shell, commands are read from /etc/zprofile and then $ZDOTDIR/.zprofile.
>> Then, if the shell is interactive, commands are read from /etc/zshrc and
>> then $ZDOTDIR/.zshrc."
>>
>> Given that this is an interactive shell, I think it will not read
>> .zprofile.
> 
> Executing a command with `-c` doesn't give you an interactive or login shell, so it won't read zshrc or zprofile files.

ah, yes, off course, my mistake.

Best,
Miguel

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.