PROMPT_COMMAND=sleep\ 1 is great, it lets us slow down scripts...
but alas only if they are interactive.
One might say: "Sure, instead of
$ bash script
just use
$ sed 's/^/sleep 1; /' script | bash"
But that assumes one command per line, and could easily mangle things.
Instead bash simply needs
On 3/10/20 4:04 PM, Greg Wooledge wrote:
> On Tue, Mar 10, 2020 at 08:57:26PM +0100, Phi Debian wrote:
>> Secondly, if yuio insist on going on the subshell path, then $$ and $PPID
>> ought to be setup appropriately, here ther are plain bogus.
>
> wooledg:~$ command_not_found_handle() { echo "\$\$=
On 3/10/20 3:57 PM, Phi Debian wrote:
>
> Hi All,
>
> I think it is a bug, it is not working as intended at least in the man
> page, it says.
>
> If that function exists, it is invoked
> with the original command and the original command's arguments as its
> arguments, and the
On Tue, Mar 10, 2020 at 08:57:26PM +0100, Phi Debian wrote:
> Secondly, if yuio insist on going on the subshell path, then $$ and $PPID
> ought to be setup appropriately, here ther are plain bogus.
wooledg:~$ command_not_found_handle() { echo "\$\$=$$ BASHPID=$BASHPID"; }
wooledg:~$ echo "\$\$=$$
Hi All,
I think it is a bug, it is not working as intended at least in the man
page, it says.
If that function exists, it is invoked
with the original command and the original command's arguments as
its
arguments, and the function's exit status becomes the exit status
of
On 3/10/20 1:37 PM, Phi Debian wrote:
> In a nutshell to implement a function autoloading I want to plug into
> command_not_found_handle(), but I need command_not_found_handle()be
> evaluated in the shell context, not in a subshell.
OK, so this is not an appropriate feature for what you want to d
On Tue, Mar 10, 2020 at 06:37:24PM +0100, Phi Debian wrote:
> In a nutshell to implement a function autoloading I want to plug into
> command_not_found_handle(), but I need command_not_found_handle()be
> evaluated in the shell context, not in a subshell.
You can't. Bash has already forked the sub
diff --git a/execute_cmd.c b/execute_cmd.c
index 3864986d..ef32631a 100644
--- a/execute_cmd.c
+++ b/execute_cmd.c
@@ -5370,6 +5370,20 @@ execute_disk_command (words, redirects,
command_line, pipe_in, pipe_out,
command = search_for_command (pathname, CMDSRCH_HASH|(stdpath ?
CMDSRCH_STDPATH : 0)
Hi All,
While trying to implement an function autoload feature, with a lazier
function loading and invocation than the example provided in bash doc, I
bumped into this bash bug (or feature, you let me know).
I asked stackoverflow for some ideas, one pointed me to
command_not_found_handle() that
On 3/9/20 3:29 PM, Martin Castillo wrote:
> Bash Version: 5.0
> Patch Level: 16
> Release Status: release
>
> Description:
> Out of nowhere, bash inserts an ascii DEL in the first expansion. That
> is very unexpected and shouldn't be there.
Thanks for the report. This happens in the case where t
10 matches
Mail list logo