4 ms·
I understand your frustration, but what if the program thinks you're doing something you're not? You may do irreversible damage. I guarantee that you'd be far m
by shocks 14y ago
I understand your frustration, but what if the program thinks you're doing something you're not? You may do irreversible damage. I guarantee that you'd be far more pissed if you trashed an entire project than you are about 'shitdick excuses'.
- nailer 14y agoSure, but: heroku console -> heroku slightlydifferentsyntaxforconsole is not one of those cases.
- pygy_ 14y ago$ git statis error. Did you mean status? Y/n You'd get the best of both worlds.
- bluetech 14y agoUse an alias! I like git config --global alias.s 'status --short --branch'
- aerolite 14y agoOk, but please don't alias statis to status. That's a horrendous typo.
- cowpewter 14y agoI want git to do that so badly. It's not like its output is particularly pipe-friendly anyway. Just ask me, don't make me type the whole thing again. Especially annoying when it's a longer command with a bunch of arguments or one that in no way could have negative side-effects, like git status or git log
- nitrogen 14y agoWhy are you typing the whole thing again instead of using the up arrow or Ctrl-P?
- cpr 14y agohttp://stackoverflow.com/questions/5167367/how-can-i-make-git-do-the-did-you-mean-suggestion http://stackoverflow.com/questions/5167367/how-can-i-make-gi...
- cowpewter 14y agoThank you so much.
- masklinn 14y agozsh can do that: > ce somedir zsh: correct 'ce' to 'cd' [nyae]? y
- loeg 14y agoUgh, this is my second least favorite "feature" of zsh. (First is "are you sure you want to delete all of the files in this directory?")
- enjo 14y agoThe old "DELETE FROM some_table" <enter> Crap.. I meant "DELETE FROM some_table WHERE id=1" sighs
- naudo 14y agoAfter doing that on a local db a couple of times, I started just writing the where clause first. Goes like this WHERE id = 1 ctrl + a DELETE FROM.... Found it's also helpful for writing SELECTS and avoiding the whole "oh crap, now let's load the entire DB" type of moments.
- iaskwhy 14y agoI always SELECT first and confirm I got the right result. Then I add the DELETE just before SELECT and commment out the SELECT line. Never fails!
- schrodinger 14y agoIf you're in a GUI where you can run only the highlighted code, I do this: select * -- delete from sometable where id = 1 Then you can run the whole thing to see what would be deleted, and highlight starting at the word delete to actually delete.
- methurston 14y agoI do this too, If I'm saving the file for reuse, I wrap the entire thing in /* */ when I'm done just in case I accidentally hit run script instead of run statement.
- vidarh 14y agoThe MySQL command line client has an argument "--i-am-a-dummy" that refuses to run UPDATE and DELETE's without a WHERE clause. More commands could use options to adjust how big guns they let you fire at your feet with...
- gknoy 14y agoSuch options might be more appealing to users if it were named something like "--extra-safety" or "--require-where".
- rwallace 14y agoThe solution to that is to make potentially damaging operations reversible, not to throw the problem back in the user's face. In fact, this is a very reliable design smell: any time you find yourself throwing something back in the user's face, stop and think about the problem for a few minutes. 99% of the time, the right solution is to provide more reversibility instead.