LP_ENABLE_RUNTIME break Bash's $_ feature
Created by: mathieumd
When enabling LP_ENABLE_RUNTIME
, using Bash internal variable $_
to get the previous command's last parameter returns _lp_reset_runtime. However, !$
does still work.
- With
LP_ENABLE_RUNTIME=0
:
23:19:39 ⌂102% [:~] $ sleep 3
23:19:45 ⌂99% [:~] $ echo $_
3
23:19:47 ⌂96% [:~] $ sleep 2
23:23:34 ⌂94% [:~] $ echo !$
echo 2
2
23:23:37 ⌂94% [:~] $
- With
LP_ENABLE_RUNTIME=1
:
23:22:38 ⌂114% [:~] $ sleep 3
23:22:43 ⌂110% [:~] 3s $ echo $_
_lp_reset_runtime
23:22:47 ⌂112% [:~] $ sleep 2
23:22:58 ⌂107% [:~] 2s $ echo !$
echo 2
2
23:23:03 ⌂104% [:~] $