

New Firefox Command Line helps you develop faster - ptgloden
https://hacks.mozilla.org/2012/08/new-firefox-command-line-helps-you-develop-faster/

======
the_mitsuhiko
And yet firebug is still the better console. Why do fancy things like tilt and
this input box have priority over getting basic things like the console output
under control?

Just look at this example side by side and tell me which one you prefer:
<http://i.imgur.com/tKr87.png>

~~~
dangoor
I have a good reason for wanting this to land "earlyish" – to encourage the
creation of more commands and full command access to the tools. If the command
line is there and seeded with a few commands, people will start adding more
(both for built-in tools and add-ons)

~~~
karl_nerd
I'm super interested in this! Any code examples you can point to?

------
agentultra
Vimperator and Pentadactyl have had something like this for some time and I've
found it really useful. This feature of course goes a little above and beyond
and it looks really exciting. Congrats Mozilla!

------
sp332
I wonder if this shares code with the promising-but-defunct Ubiquity project?
<https://vimeo.com/1561578> Edit: if you don't feel like watching a video,
here's what it's about: <http://www.azarask.in/blog/post/ubiquity-in-depth/>

~~~
mhitza
I've had so much hope in Ubiquity; let's hope this will get a nicer model for
writing extensions and a "package" manager (I'd love something like Sublime2
has).

~~~
frewsxcv
Ubiquity continued development recently

[https://addons.mozilla.org/en-US/firefox/addon/mozilla-
labs-...](https://addons.mozilla.org/en-US/firefox/addon/mozilla-labs-
ubiquity/versions/?page=1#version-0.6.2)

~~~
windsurfer
I don't think so. Only major thing I see is the homepage URL changed to
<https://wiki.mozilla.org/Labs/Ubiquity>

~~~
sp332
At least it was updated to work with FF 13+.

    
    
      Version 0.6.2
      Released July 19, 2012 1.0 MB
      Works with Firefox 13.0 and later

------
nathan_long
Wow. This may make switch back to Firefox from Chrome as my develoment
browser.

Bravo, Mozilla!

~~~
eupharis
I saw this and thought the exact same thing! Super excited to test it out upon
release.

The other nice thing about FF for devs is that Chrome is a little too robust
sometimes. I've had some egregious errors in my markup and Chrome still
manages to do what I intended. But then it's broken on every other browser.

As far as I've experienced, anything that runs perfectly in FF runs perfectly
in Chrome. But the reverse is not true.

~~~
justincormack
They should both be using the html5 parser now, so "errors" should be well
defined rather than browser dependent. Could be a bug in the implementation.

------
mcpherrinm
I'm loving this. It didn't seem like the most useful feature when I first
heard about it, but it seems pretty well implemented. (Using the current
nightly).

The pagemod and inspect commands seem super useful. I hate having to click
around an inspector to find the thing I want -- "inspect #foo > h3" just seems
so much easier.

~~~
agumonkey
You made me investigate HN dom structure and it's quite scary !

~~~
snprbob86
It works, doesn't it?

If you have to interface with HTML or CSS directly and frequently while
writing your application, then you want to make sure your HTML and CSS are
super clean and maintainable. But, as PG has said before, HTML can be treated
like object code! There was once a time when everyone had to write super clean
and maintainable assembly code, but now you rely on a compiler.

Ever look at compiler generated assembly code? It's quite scary!

~~~
icebraining
I find that a shortsighted attitude by PG. Web pages shouldn't be just a black
box to present to the user. They should be structured documents that is
flexible and malleable, so that the user or third parties can filter, adapt
and enhance the content.

<http://userscripts.org/> is the best example of that, but there are many
others.

~~~
snprbob86
[http://userscripts.org/scripts/search?q=hacker+news&subm...](http://userscripts.org/scripts/search?q=hacker+news&submit=Search)

Seems to be a non-problem...

------
city41
I really hope they add "cache clear", "cache disable", "cache enable", etc.

------
se85
I don't understand what this does that can't already be done a hell of a lot
better with the combo of firefox/firebug and the web developer toolbar?

What is the value proposition here? Perhaps I'm missing something but it just
looks like a CLI interface over the top of JavaScript (as opposed to the
GUI/CLI approach with firebug - which is a far more scaleable approach).

Is this thing going to need 1000 plugins installed within the plugin just to
offer the same functionality as firebug?

I didn't understand the 3d view of web pages either and their GUI for their
version of firebug is completely inferior (even though it looks fancier).

Looks are not everything.

Why has any of this stuff even been allowed to be prioritised over core
browser performance and functionality.

It is a sad state of affairs to see what Firefox has devolved into compared to
how it was in its glory days.

~~~
evolve2k
Taking that approach to its logical confusion even firebug would have never
been developed.

------
greenyoda
It would be nice if the command line supported a shell-like language that
would allow you to easily parameterize and script these Firefox commands. So
instead of running one command at a time, you could create files that ran
commands sequentially, iteratively, etc. There could even be syntax that sets
variables to the values of arbitrary JavaScript expressions (which would give
you access to any DOM attribute, for example).

~~~
micaeked
perhaps use javascript for that?

~~~
snprbob86
JavaScript, and most contemporary languages for that matter, would be pretty
poor choices for such a use case. In particular, the concern here is the need
for a language that is commands first and expressions second. It's an
analogous situation to template languages. Consider Ruby's erb, for example.
It's like you took Ruby, made String interpolation the default, and provided
an escape hatch to get to full Ruby, not just the limited interpolation
subset.

It's kinda sad that the world seems to have forgotten Tcl:
<http://en.wikipedia.org/wiki/Tcl>

In the case of tcl, you invert C functions (or another language with C-style
calling conventions) to be callable by default as commands. You then have the
[expr ...] escape hatch to toggle back to the non-default programing mode,
that gives you expressions, arithmetic, and other general purpose programming
language features.

I'd really love to see a Tcl++ type thing. It would be super cool if
applications could easily drop a console, like this one from Mozilla, into
their app. Bonus points if it comes complete with a help system, UI,
completion, etc.!

------
mayanksinghal
(This is way off the topic, but I am way too curious to ignore and couldn't
satisfy my curiosity myself, so) Is the title of the article getting rendered
differently (different font) than in other pages, in Google Chrome?

Screenshot: <http://i.imgur.com/tWAXr.jpg>

------
superxor
The FF dev tools offer a very different experience compared to Chrome. I am
curious about the rationale between having different views for web inspector &
debugger.

I am on Aurora/Ubuntu. The binding for the Debugger (Ctrl-Shft-S) doesn't seem
to work for me and the Dev toolbar has no way to open the debugger view.

------
conradfr
It made me go look in the menu and discovered the new Responsive design mode
in FF15, it will be a valuable tool.

~~~
fuzzix
Looks quite useful, though I didn't see a way to customise the view port
dimensions - it appears to lack common phone screen resolutions.

~~~
halvsjur
According to the article, you can type:

    
    
        resize to 320 480

~~~
lloeki
Which is awesome, as I can finally drop my ridiculously contrived JS
bookmarklets.

------
arnarbi
Every app should have this.

~~~
dangoor
That's my feeling, too. I really like that in Sublime Text I can hit a
shortcut that launches any of the random commands available in the editor.

I would probably amend the statement to be "Every app for programmers should
have this."

~~~
arnarbi
Not just programmers. AutoCAD has had this kind of interface always, and it is
absolutely the best/fastest way for power users to make drawings. Integrating
nicely textual commands, prompts and mouse usage works very well there.

Looking at proficient Excel users (I always claimed if my ex-wife got a basic
course in operating systems principles, she would write one in Excel in a week
:) = they tend to do everything by keyboard, and not in terms of shortcuts or
chords, but entering commands. I also worked in a printing shop, and people
working in layout program such as InDesign all day, would do everything by
keyboard also - entering coordinates, align constraints, style names - and
they were only slowed down by having to navigate all those little input boxes.

I also worked for a couple of years editing video in non-linear editing
programs (Media 100, Premiere), and boy does this work get repetitive at
times. I would have loved to have the ability to do things programmatically.

So, I think _any_ power user could benefit from a command line driven
interface in applications like those. Photoshop, non-linear video editing,
computer aided design, layout, word processing, and even web browsing - I
could see this option used by all kinds of people.

------
mixmastamyk
Neat, but "console clear" to clear struck me. A bit verbose, no? After years
of "cls" (aliased on unix) I might not bother with the number of keystrokes
required.

~~~
nameuserc
I save ESC2J to a file and my "cls" is simply another file consisting of

cat file1

in my PATH. Only because sometimes printf or some other way to print ESC's
might not be available.

The idea of starting up X11 so I can start the super-sized code complexity
experiment that calls itself "Firefox", all just to get to a command line
struck me. The fact they are calling the approach at Mozilla as "responsive
design" I found insulting.

Are they in denial about just how big and complex Firefox is? This is not how
you attain responsive design.

~~~
ptgloden
They identified the Mozilla home page as an example of responsive design, not
Firefox. The feature being demonstrated with that example was the ability to
"resize" the browser window to see how a page built with "responsive design"
in mind would be rendered with, say, a mobile device with a smaller screen.
Pretty useful, if you ask me.

~~~
nameuserc
Definitely. I just wish they would make some changes so that we can use the
"70's style command line" more with Firefox. In other words, options and
arguments we can pass to Firefox (the xulrunner app) via the
Linux/BSD/OSX/Windows commandline.

For example if I have Firefox running in Xvfb it would be nice to be able to
issue remote commands (an early version of Mozilla did have something like
this if I recall correctly: -remote), such as the commands they are
implementing for this "graphical command line". It would be convenient to
easily dump screenshots to image files without having to run something like
Crowbar.

Anyway at least they are starting to acknowledge that not everyone uses a
mouse or prefers using a trackpad over hitting keys. I mean keys as tactile
buttons, not images of onscreen keyboard, like the iPhone or iPad.

------
tambourine_man
Amazing that after all these years, the mouse, perhaps the most iconic symbol
of the PC, is being ditched for just about every application.

~~~
sp332
A mouse is OK for expressing verbs, not so much nouns or adjectives.

~~~
aidos
Could you explain what you mean? Seems to me that the mouse is best at
expressing nouns - well, the things you see on screen...I'm obviously
misunderstanding.

~~~
sp332
A mouse is fine for indicating existing nouns. But describing a brand-new
thing is more difficult.

------
danmaz74
I really like the screenshot feature for a specific element. Hope that chrome
will add this too (preferably via mouse interface though)

------
itsbits
3D View is only thing that sometimes take me to Firefox console..Still not
exciting to avoid firebug...

------
agumonkey
It was unstable and rarely discussed until recently. This is very wellcome.

------
railswarrior
I really liked the cookie feature ,could use it a lot.

