tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: interactive shell detection in shrc



On Mon, Sep 30, 2024 at 1:26 PM George Georgalis <george%galis.org@localhost> wrote:

>
> On Mon, Sep 30, 2024 at 1:09 PM <tlaronde%kergis.com@localhost> wrote:
>
>> So how can the test be reliable in all circumstances?
>>
>
> test -t 0
>
> is reliable.
>
> I use
>
> tty -s || return 0
>
> to remind me what I'm testing for (same difference),
> and branch out of .profile for not interactive sessions.
>

Is there a case where this is not the solution?
When I decided this is what interactive means
all of the edge cases went away. Is there a
case I am not considering?


-- 
George Georgalis, (415) 894-2710, http://www.galis.org/


Home | Main Index | Thread Index | Old Index