help-bash
[Top][All Lists]
Advanced

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

Re: is it normal that $BASH_COMMAND doesnt contain func() definition cmd


From: alex xmb ratchev
Subject: Re: is it normal that $BASH_COMMAND doesnt contain func() definition cmds ? then its just ( again ? ) the last cmd before foo() def
Date: Fri, 30 Jun 2023 05:48:23 +0200

On Fri, Jun 30, 2023, 05:33 Kerin Millar <kfm@plushkava.net> wrote:

> On Fri, 30 Jun 2023 04:26:34 +0200
> alex xmb ratchev <fxmbsw7@gmail.com> wrote:
>
> > On Fri, Jun 30, 2023, 04:01 Kerin Millar <kfm@plushkava.net> wrote:
> >
> > > On Fri, 30 Jun 2023 03:49:46 +0200
> > > alex xmb ratchev <fxmbsw7@gmail.com> wrote:
> > >
> > > > On Fri, Jun 30, 2023, 03:23 Kerin Millar <kfm@plushkava.net> wrote:
> > > >
> > > > > On Fri, 30 Jun 2023 01:34:43 +0200
> > > > > alex xmb ratchev <fxmbsw7@gmail.com> wrote:
> > > > >
> > > > > > im working on a multiline prompt
> > > > > > i use $BASH_COMMAND there
> > > > > >
> > > > > > the line before the numbers and PWD is bash_cmd
> > > > > >
> > > > > > foo() : and complete foo() dont appear
> > > > > > i just wanna say thats a buggy loss
> > > > > >
> > > > > > type foo
> > > > > > bash: type: foo: not found
> > > > > >
> > > > > > type foo
> > > > > > 1 10216 10216 10216 /data/data/com.termux/files/home
> > > > > > foo() :
> > > > > > bash: syntax error near unexpected token `:'
> > > > >
> > > > > Given that the input could not be parsed, it's unreasonable to
> expect
> > > it
> > > > > to qualify as a "command currently being executed or about to be
> > > executed".
> > > > > It is neither of those things.
> > > > >
> > > >
> > > > i would have guessed it is like cmdhist , ..
> > >
> > > Perhaps $READLINE_LINE would be to your taste.
> > >
> >
> > how to get this variable
> > havent compiled bash.dev yet .. is it there .. ?
>
> It's there but only usable in certain contexts. I had it in my mind that
> it would be expandable in PS1. Unfortunately, that doesn't seem to be true.
>

if it s anywhere : assign shell var with its content
then in ps1 that $var

ill newest devel ncurses readline bash
then i can check

-- 
> Kerin Millar
>

 a x r

>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]