On Tue, 1 Oct 2024, RVP wrote:
Ugly, but, works--after a fashion:
- Only for DIRs in the CWD.
- no `/' allowed in DIR.
- if CMD with the same name as DIR is found in $PATH, that will be executed.
(I tried defining a command_not_found_handle function but that doesn't
seem to work if the comm
On Tue, 1 Oct 2024, Rhialto wrote:
In bash, I use an alias '..' for 'cd ..', and '...' for 'cd ../..', and
a few levels more. It is a very poor approximation of the AmigaShell
feature where typing a directory name as a command does a 'cd' to that
directory. I wish (ba)sh had such a feature...
In bash, I use an alias '..' for 'cd ..', and '...' for 'cd ../..', and
a few levels more. It is a very poor approximation of the AmigaShell
feature where typing a directory name as a command does a 'cd' to that
directory. I wish (ba)sh had such a feature... (I tried defining a
command_not_found_ha
On Mon, 30 Sep 2024, Robert Elz wrote:
| This is _very_ surprising; esp. when /bin/sh doesn't allow chars.
| like `/' and `.' in the function name.
Huh?
sh $ a.v() echo I have a dot in my name
sh $ a.v
I have a dot in my name
Ah, that's right. It's FreeBSD's /bin/sh (and dash) which doesn
> But in general, no, there's probably not a lot of use for it, but nor
> is there any particular reason to add special case code to prohibit
> it.
I was thinking, most languages have names for functions and such, but
sh is one of the few languages in which a zero-length routine name is
even repre
Date:Sun, 29 Sep 2024 23:59:48 + (UTC)
From:RVP
Message-ID:
| This is _very_ surprising; esp. when /bin/sh doesn't allow chars.
| like `/' and `.' in the function name.
Huh?
sh $ a.v() echo I have a dot in my name
sh $ a.v
I have a dot in my name
You can
On Wed, 25 Sep 2024, Robert Elz wrote:
In NetBSD's sh you can actually do
''() { echo nothing; }
(where the function body can be anything of course), then the empty-string
command (as distinct from absent command) does exist, and works, but I would
not recommend this to anyone, it isn'
Robert Elz wrote in
<6599.1727248...@jacaranda.noi.kre.to>:
|Date:Tue, 24 Sep 2024 23:54:13 + (UTC)
|From:RVP
|Message-ID: <4d7cdca7-fcf4-8985-7c1d-79ef63125...@sdf.org>
|
|| On Tue, 24 Sep 2024, Steffen Nurpmeso wrote:
|
|I replied to Steffen's (pre-forwar
RVP wrote in
<4d7cdca7-fcf4-8985-7c1d-79ef63125...@sdf.org>:
|On Tue, 24 Sep 2024, Steffen Nurpmeso wrote:
|> Robert Elz wrote in
|> <7132.1727161...@jacaranda.noi.kre.to>:
|>|Date:Tue, 24 Sep 2024 00:56:40 +0200
|> [...]
|>| if $___SHRC
|>
|> Oh, i would be afraid of doing thi
Date:Wed, 25 Sep 2024 14:17:07 +0700
From:Robert Elz
Message-ID: <6599.1727248...@jacaranda.noi.kre.to>
| Not a syntax error, an execution error,
Sorry, saw your following message correcting that after I replied.
| In NetBSD's sh you can actually do
| ''()
Date:Tue, 24 Sep 2024 23:54:13 + (UTC)
From:RVP
Message-ID: <4d7cdca7-fcf4-8985-7c1d-79ef63125...@sdf.org>
| On Tue, 24 Sep 2024, Steffen Nurpmeso wrote:
I replied to Steffen's (pre-forwarded) message off list, but:
| Yes, this surprised me too. This test is
On Tue, 24 Sep 2024, RVP wrote:
| if "${___SHRC:-:}"
A syntax error of yours?
No, that becomes `if ":" ...' $___SHRC is undefined or empty. You need to
write it that way, else it's a syntax error.
Sorry, I meant to say a "command not found" error (when trying to execute an
empty string
On Tue, 24 Sep 2024, Steffen Nurpmeso wrote:
Robert Elz wrote in
<7132.1727161...@jacaranda.noi.kre.to>:
|Date:Tue, 24 Sep 2024 00:56:40 +0200
[...]
| if $___SHRC
Oh, i would be afraid of doing this implicit test. I no longer
have many shells around, not even as source code, so i w
--- Forwarded from Steffen Nurpmeso ---
Date: Tue, 24 Sep 2024 22:26:34 +0200
Author: Steffen Nurpmeso
From: Steffen Nurpmeso
To: Robert Elz
Cc: Valery Ushakov
Subject: Re: interactive shell detection in shrc
Message-ID: <20240924202634.-Z-0KGXP@steffen%sdaoden.eu>
Robert Elz wrote in
<7132.
14 matches
Mail list logo