7 ms·
Snark aside, it's a valid point. Shouldn't CLI tools mimic GUI tools?
by tomrod 14y ago
Snark aside, it's a valid point. Shouldn't CLI tools mimic GUI tools?
- phogster 14y agoNo.
- peterwwillis 14y agoWhy?
- loungin 14y agoJust throwing out a quick response (I'm not GP) but because they are different interfaces. While they both may display the same content and in the broader overall sense behave similarly, how you interact with the content and program itself is different.
- jlgreco 14y agoWould you expect curl to exhibit the same url suggestion/correction behavior as firefox does? These tools are only CLI/GUI equivalents of each other in a very superficial sense.
- tedunangst 14y agoNo, because the suggestion behavior is a direct function of the UI. I may expect my shell to offer suggestions or autocomplete based on previous history, however. With either program, I expect them to both perform the core task of "download stuff". Dash and grep may have different interfaces, but if their core purpose is "search stuff", it is not wholly unreasonable to expect them to be able to search the same stuff. [grep is probably the wrong tool. perhaps the output should be included in find instead.]
- jlgreco 14y ago> if their core purpose is "search stuff" As I said, they are the same tool only in the most superficial of senses. Is the purpose of this ubuntu thing even to grep input streams or files? Or did the submitter of this 'bug' actually mean to file a bug for slocate, mlocate, or find? Does it do both? These tools have completely different purposes and uses. How about this for another reason though: http://pubs.opengroup.org/onlinepubs/009695399/utilities/grep.html http://pubs.opengroup.org/onlinepubs/009695399/utilities/gre... GNU is bad enough, having Ubuntu tack on whatever shit they feel is "user friendly" would turn the situation into a usability nightmare. PS. Is this thing seriously called dash? If so, that is terrible. The name 'dash' is already taken... in the FOSS world... by Ubuntu's daddy distro Debian. Hell, Googling "ubuntu dash" returns first results for the proper dash. What the hell were they thinking?
- dredmorbius 14y agozsh
- jlgreco 14y ago...is not a part of curl. And that is rather the point is it not? If you want to add completion to curl, you don't. Because that is a task for another program. If you want to add amazon searching to grep, you don't. Because that is a task for another program.
- dredmorbius 14y agoMy point was that command-line completions are possible, and are, in fact, pretty sophisticated. Despite my using 'zsh' as the meme, I'm much more a bash user myself, but even its commandline completions are extensive, and include the ability to suggest completions, alternatives, and the like. Commands such as ssh will utilize various resources to suggest hostname completions and the like. Whether and how desirable this is is quite the different question. But it's very technically feasible.
- jlgreco 14y agoI am not saying that it could not be done. I am saying it should not be done, and cannot be done well.
- peterwwillis 14y agoTwo things: 1. Why on earth wouldn't you want url suggestion/completion for cURL? If there's one place that benefits from a lack of typing it's command-line tools (which is why modern shells all have command and file tab completion). 2. Browsers like 'links' and 'w3m' go so far as to implement mouse support so you can emulate a GUI on the console. Why not for cURL? Just because it has a billion obscure command-line arguments doesn't mean it's a great idea to keep it that way. With a console ncurses UI for cURL I could pick all the options I wanted quickly instead of paging through dozens of man page options, then copying them down with the argument I wanted and re-typing them in line. I don't think shells should suffer from a lack of innovation just because everyone's obsessed with JavaScript.
- Flimm 14y agoI suppose some people might find a use for a CLI interface to the dash's search engine. Changing the behaviour of `grep -R` is definitely not the correct answer, though.
- chimeracoder 14y ago> Changing the behaviour of `grep -R` is definitely not the correct answer, though. What about changing the behavior of grep -r? (Sorry, I just couldn't resist. When I first clicked the link, I actually thought this was a reference to the GNU grep changes at first).
- jlgreco 14y agoDing ding ding. If you want a CLI equivalent of "ubuntu-dash", then you have to make one. grep is not it. And as far as I am concerned, anyone who honestly finds themselves wishing cli tools worked like gui tools should knock themselves out. I'm sure plenty of people would find it useful.
- jrajav 14y agoYou can elegantly present advertising and other non-essential elements alongside the main content of a GUI interface. There is no elegant way to do this with a CLI interface since it is not a static interface, it is a stream of characters. Anything that's not content will have to be inline with user-generated input and output. It would be like a weather app with ads in the middle of the sun icon.
- subhro 14y ago>It would be like a weather app with ads in the middle of the sun icon. The analogy is just awesome!! Thanks a ton for bringing a smile on a gloomy day :)
- tedunangst 14y agoThe amazon results are effectively inline with regular results (placed just after, but with the same appearance). There's no reason grep could not also list a few amazon products with URLs after the regular results.
- jlgreco 14y agoHow frequently do you pipe the output of this ubuntu "dash" to another program?
- tedunangst 14y agoIt could write the output to stderr. Or only write it if stdout is a terminal. Or create a new window that temporarily overlays the xterm running the command. Yes, amazon-enabled dash and grep/find/whatever have different functionality. But that's a recent change. Previously, dash had exactly the same functionality. That's the entire point. You add a feature here, you add the same feature there.
- jlgreco 14y agoSo now grep prints advertisements if I have it print to a tty, but not if I have it print to a pipe that goes to a pager? Which I almost certainly would be doing if advertisements are pushing my output over 20 or so lines? That is your idea of usability? Brilliant, just brilliant. I suppose I shouldn't even bother to ask what happens if I have tty output being consumed by another program. >Or create a new window that temporarily overlays the xterm running the command. You have got to be kidding me. This is a joke. >Previously, dash had exactly the same functionality The exact same functionality of which? And I rather doubt that is true. >You add a feature here, you add the same feature there. No. No you do not. Not when there is standardized. And in this case the "here"/"there" relationship has not even been established for "ubuntu-dash"/grep, making this extra idiotic.
- Newky 14y agoNot sure whether they should mimic GUI tools, however having tools which provide a graphical user interface, but are fully functional (or at least as much as is possible) from the CLI is the ideal way for a program to be in my opinion. Where applicable, a command line option can be a great supplement when something that can be achieved via the GUI . For example, encoding a video to a certain codec, having a visual wrapper on this is a nice to have if converting one video or a few videos. However if that same application allows the ability to encode thousands of videos using the CLI option, its an added ability that is appreciated.
- VMG 14y agoquake3cli --map anarki -e '(walk-forward) (rotate 0.2) (fire)'
- jimktrains2 14y agoHmm, would I use -e - or will it read from stdin if I don't supply -e? How do I pipe to it?
- deleted 14y ago[deleted]
- gknoy 14y agoI imagine you'd read from /dev/random, if you wanted to play as well as I do. All joking aside, I imagine that one could easily write a bot that allowed one to give it heuristics via STDIN or a command line parameter. I doubt many would do it this way, but it would be consistent with the unix design ethos. One program would manage the Playing the Game and perhaps providing an API for interacting with the game, or even a pluggable section of games, and another would handle generating heuristics (or retrieving them). Then you could, e.g.: multibot -g quake3 --name "Rocket Llama" -h rockets.lua multibot -g quake3 --name "Ash" -h shotgun-only.lua cat /dev/urandom | multibot -g quake3 --name "Confused" multibot -g civ3 --name "Dr. No" -h well-defended-island.lua multibot -g civ3 --name "Dr. Evil" -h meeeeelion.lua That'd be a nightmare to implement, of course. :-)
- tedunangst 14y agoSarcasm? Not the best counterexample, as that's how lots of bots work. The AI engine does not exclusively work by rendering the scene and attempting to visually identify targets.
- VMG 14y agoStill, there has been a lack of outcry about the absence of a quake3 command line version. Because nobody needs it.
- statictype 14y agoNo.