Closed
Bug 1026658
Opened 10 years ago
Closed 10 years ago
$_ should access the most recently evaluated expression in the console
Categories
(DevTools :: Console, defect)
DevTools
Console
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 792063
People
(Reporter: bgrins, Unassigned, Mentored)
Details
This is a handy shortcut in the console that lets you access the most recently evaluated expression: It's supported by both Firebug and Chrome: Firebug: https://getfirebug.com/wiki/index.php/Command_Line_API#.24 Chrome: https://developer.chrome.com/devtools/docs/commandline-api#_ Example: var foo = "bar" foo // Evaluates to "bar" $_ // Evaluates to "bar"
Comment 1•10 years ago
|
||
This rocks.
Comment 2•10 years ago
|
||
Might as well implement the other $ shortcuts as well.
Comment 3•10 years ago
|
||
Besides $_, we are only missing $p, $n and $1. $n and especially $1 seem only marginally useful and $n isn't supported by Chrome (but they do have $2 - $4, *sigh*). Chrome doesn't even have $p, they use "window.tempXX" IIANM. I will be happy to mentor anyone who has the time to work on this, but I'm not sure if we want to add all of them without clear evidence that people want them.
Mentor: past
Comment 4•10 years ago
|
||
This would be useful, so I'd like to take a shot at it.
Comment 5•10 years ago
|
||
I came across this today whilst searching for $_ It seems linked to #792063 (which has a patch for adding $_).
Comment 6•10 years ago
|
||
It is indeed a duplicate, thanks!
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•