Sujet : Re: [ksh93] defunct 'fc' command?
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.unix.shellDate : 02. Jul 2024, 18:02:19
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v618ac$1mvae$1@dont-email.me>
References : 1 2 3 4
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 02.07.2024 14:50, Geoff Clare wrote:
>
Or, if you only want to execute one command, you can use -s (without
specifying a substitution).
>
I had tried this before and got an inconsistent error message (-e
instead of -s) when [inappropriately] trying for a range
>
$ fc -s 1071 1073
ksh: fc: -e - requires single argument
>
so I haven't followed that path further.
Yes, you can't give a range with -s (which is why I wrote "if you only
want to execute one command" above).
Yes, sure. - Above I've just described the experiments I've done
before your post (and even before I've written my original post
here). - It was no disrespect, just your post came too late. :-)
What I tried to say above was that I tried -s and that the error
message -e contributed to my impression that something is spoiled,
thus me not following this specific trial.
Actually, with my original intention to emulate the Emacs-mode ^O
function in Vi-mode I haven't spent any more time. My impression
is that it's a function that should be supported as shell builtin.
It seems to not make sense trying KEYDB traps or grep'ing the
${HISTFILE} contents (just to name two thoughts I pondered about).
Wasn't there some callback facility (maybe also through discipline
functions) to obtain and manipulate an entered command line before
it gets evaluated? (I thought to recall something like that. If so
it might be a way to more easily get the desired function working.
Must have a look... - but not now.)
Janis