Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 40 |
Nodes: | 6 (0 / 6) |
Uptime: | 21:51:49 |
Calls: | 291 |
Files: | 910 |
Messages: | 76,667 |
Posted today: | 1 |
I recently replaced all original ksh93u+ by ksh93u+m, and meanwhile
noticed quite some deficiencies, things that worked in original ksh
but not any more in ksh93u+m.
The latest observation is that in interactive mode with 'set -o vi'
I was able to write a command substitution, say,
ls $(date)
and with the cursor positioned (e.g.) at the closing parenthesis I
could expand the argument by Esc-* to obtain
ls 2024\-05\-21
This does not seem to work in ksh93u+m. - Is there a chance to get
original ksh behavior back?
Op 21-05-2024 om 17:57 schreef Janis Papanagnou:
I recently replaced all original ksh93u+ by ksh93u+m, and meanwhile
noticed quite some deficiencies, things that worked in original ksh
but not any more in ksh93u+m.
I would of course be very interested in learning what deficiencies
(other than the below) you've been observing.
The latest observation is that in interactive mode with 'set -o vi'
I was able to write a command substitution, say,
ls $(date)
and with the cursor positioned (e.g.) at the closing parenthesis I
could expand the argument by Esc-* to obtain
ls 2024\-05\-21
This does not seem to work in ksh93u+m. - Is there a chance to get
original ksh behavior back?
"Subshell expansion" was never meant to be a thing and is not documented anywhere.
The behaviour was a bug; this was not supposed to happen.
It
also behaved inconsistently and crashed the shell in some cases.
For further details and rationale, please see: https://github.com/ksh93/ksh/commit/7a2d3564 https://github.com/ksh93/ksh/issues/268
The documented behaviour of ESC-* in emacs is:
M-* Attempt pathname expansion on the current word. An
asterisk is
appended if the word doesn't match any file or contain any
special pattern characters.
Pathname expansion simply has no business executing code; that's not
what it's for.
I can see how the behaviour as you describe it could come in handy,
though. We could treat it as a feature request for version 93u+m/1.1 and
up. It would have to be implemented properly. If implemented it should probably also be bound to a new key combination.
On 22.06.2024 04:10, Janis Papanagnou wrote:
On 22.06.2024 01:14, Martijn Dekker wrote:
Op 21-05-2024 om 17:57 schreef Janis Papanagnou:
I recently replaced all original ksh93u+ by ksh93u+m, and meanwhile
noticed quite some deficiencies, things that worked in original ksh
but not any more in ksh93u+m.
I would of course be very interested in learning what deficiencies
(other than the below) you've been observing.
[...] another thing was in context of discipline functions used on
shell variables. [...]
[...]
and the "kosta" code contains
function LINES.set { .kosta.rows=${.sh.value} ; .kosta.update ;}
function COLUMNS.set { .kosta.cols=${.sh.value} ;}
function PS1.get { .kosta.compose ;}
namespace kosta
{
...
}
and it's activated by sourcing it from ~/.kshrc
I can't tell whether I have missed something with discipline functs
on built-in variables, how I used the namespaces, or something like
that. (My tries to fix that in my program logic all failed.) Though
the above "no parent" error messages did not show up with ksh93u+.
And it can now be observed in various _script interaction_ contexts.
On 22.06.2024 01:14, Martijn Dekker wrote:
Op 21-05-2024 om 17:57 schreef Janis Papanagnou:
I recently replaced all original ksh93u+ by ksh93u+m, and meanwhile
noticed quite some deficiencies, things that worked in original ksh
but not any more in ksh93u+m.
I would of course be very interested in learning what deficiencies
(other than the below) you've been observing.
Unfortunately I haven't kept track. It's just that I noticed that
a couple things that worked before do not any more. Partly because
they were probably anyway only considered experimental, partly it
were features that I'd suspect are not commonly used.
Off the top of my head one was the support of ksh's alarm timers,
and another thing was in context of discipline functions used on
shell variables. (In the latter case I have no certainty whether
it's a shell issue or whether I should have done this differently.
On 22.06.2024 04:10, Janis Papanagnou wrote:
On 22.06.2024 01:14, Martijn Dekker wrote:
Op 21-05-2024 om 17:57 schreef Janis Papanagnou:
I recently replaced all original ksh93u+ by ksh93u+m, and meanwhile
noticed quite some deficiencies, things that worked in original ksh
but not any more in ksh93u+m.
I would of course be very interested in learning what deficiencies
(other than the below) you've been observing.
Unfortunately I haven't kept track. It's just that I noticed that
a couple things that worked before do not any more. Partly because
they were probably anyway only considered experimental, partly it
were features that I'd suspect are not commonly used.
Off the top of my head one was the support of ksh's alarm timers,
[...]and another thing was in context of discipline functions used on
shell variables. (In the latter case I have no certainty whether
it's a shell issue or whether I should have done this differently.
An example for the above mentioned effect shows up like that...
$ pushftp
pushftp: LINES.set: line 44: .kosta.rows=24: no parent
pushftp: COLUMNS.set: line 45: .kosta.cols=79: no parent
pushftp: line 11: 1: pushftp file ftp-path [ domain ]
I can't tell whether I have missed something with discipline functs
on built-in variables, how I used the namespaces, or something like
that. (My tries to fix that in my program logic all failed.) Though
the above "no parent" error messages did not show up with ksh93u+.
Op 22-06-2024 om 13:15 schreef Janis Papanagnou:[...]
[...]
An example for the above mentioned effect shows up like that...
$ pushftp
pushftp: LINES.set: line 44: .kosta.rows=24: no parent
pushftp: COLUMNS.set: line 45: .kosta.cols=79: no parent
pushftp: line 11: 1: pushftp file ftp-path [ domain ]
I can't tell whether I have missed something with discipline functs
on built-in variables, how I used the namespaces, or something like
that. (My tries to fix that in my program logic all failed.) Though
the above "no parent" error messages did not show up with ksh93u+.
The fix for this is a prior 'typeset .kosta' (or even just '.kosta=') to create the parent variable.
To the best of my knowledge, this is exactly the same in 93u+ 2012-08-01:
$ /bin/ksh -c 'echo ${.sh.version}; .kosta.rows=24'
Version AJM 93u+ 2012-08-01
/bin/ksh: .kosta.rows=24: no parent
$ /bin/ksh -c 'typeset .kosta; .kosta.rows=24; echo ${.kosta.rows}'
24