12 ms·
>I quite often type git then go away and come back, then type a full git status after it. Does anyone else actually do this besides OP. I've never heard of thi
by gulperxcx 9y ago
>I quite often type git then go away and come back, then type a full git status after it.
Does anyone else actually do this besides OP. I've never heard of this problem until now.
- michael_storm 9y agoI do. Everyone has their own tics; one of mine is that.
- oneeyedpigeon 9y agoYup. With lots of commands, not just git.
- kellyjprice 9y agoAll the time, at least twice already today. Another common command that I'll start typing only to switch context from is vim.
- smellf 9y agoThink about all the keystrokes you'd save if you just typed "vi" instead.
- kellyjprice 9y agoThat's a habit I may never break. There's been enough times that vi was actually vi.
- Gaelan 9y agoWhat kind of evil system ships with both vi and vim?
- sverige 9y agoOpenBSD comes standard with vi. Vim is a package.
- simias 9y agoIt ships nvi, as do the other BSDs. I think it's reasonable, BSDs have a stronger divide between the base system and third party packages, I'm not sure it would make a lot of sense to maintain vim as part of the former. Besides on my FreeBSD system /usr/bin/vi is around 400kB while on my Debian machine /usr/bin/vim.basic is 2.4MB. It's not much these days but on embedded platform it could still make a significant difference.
- sverige 9y agoYep, and "nex/nvi are intended as bug-for-bug compatible replacements for the original Fourth Berkeley Software Distribution (4BSD) ex and vi programs."
- smellf 9y agoDebian is the same way. But as soon as you open a file with vi on a fresh install, you know it isn't vim, so you close the editor, install vim, and then the vi command opens vim.
- deleted 9y ago[deleted]
- perlgeek 9y agoI do. And I also write "vim vim thefile.txt" and stuff like that. Finally I've written a small shell function that corrects "gi tpull" to "git pull", because that happens at least once a day.
- stormbrew 9y agoYep. And I did the exact same thing the OP did about it.
- marcosdumay 9y agoI type `ls ls something` a lot because of this. As a related issue, it bothers me a lot when I type some command that I want to read the output, and then I proceed to run `ls` right in the sequence and move the output out of the screen.
- dom0 9y ago... and then you clear the scrollback (Ctrl-L) but you can't just re-run the previous command because the system is now in a different state.
- LiamPa 9y ago+1, what are you all looking at when typing git over and over again?
- Avshalom 9y agoI just type git (or more commonly ls/cd) once on auto pilot because I'm at a terminal then without thinking about it hard I'll type it in consciously because that's why I'm at a terminal. It doesn't even involve looking away
- noobermin 9y agoI do not. I thought the only reason that this was on the front page was because it was funny.
- jjar 9y agoIt's usually more "type git in a terminal then open a new tab to look something up and ALT-TAB back to the terminal" rather than a physical going away.
- deleted 9y ago[deleted]
- warp 9y agoI often type "git clone ", then switch to a browser to copy/paste the URL, which is usually fine, but there are still many times where I've happened to include "git clone" in the copied string. (So I end up with "git clone git clone $URL").
- isatty 9y agoHappens to me too!
- bsimpson 9y ago<Insert obligatory "don't ever paste into a CLI because $SECURITY and then admit that I've done the same thing.>
- itake 9y agoiTerm gives you a warning if it thinks you just pasted in something malicious
- ospider 9y agoI think it gives warning when you paste something ends with a `\n`.
- ReverseCold 9y agoI think my zsh does something to detect copy paste (and not execute the command till I press enter), or it could be iTerm, no idea.
- vbernat 9y agoMost shells now support a bracketed paste mode. zsh: https://github.com/zsh-users/zsh/commit/98687fa1dec803f041cbb5417c146d8aa5129b53 https://github.com/zsh-users/zsh/commit/98687fa1dec803f041cb..., bash: https://www.gnu.org/software/bash/manual/html_node/Readline-Init-File-Syntax.html https://www.gnu.org/software/bash/manual/html_node/Readline-... (enable-bracketed-paste)
- masklinn 9y ago> Does anyone else actually do this besides OP. Guilty as charged. I'll commonly start typing git, think about something else, switch to my editor, browser or an other terminal tab, then come back and type "git <command>" in full. Unsurprisingly… > rg 'git =' ~/.gitconfig 7: git = ! git
- dorian-graph 9y agoYup, I do.
- deleted 9y ago[deleted]
- snowpalmer 9y agoFWIW, I'm also baffled that this is a problem to solve.
- deleted 9y ago[deleted]
- deleted 9y ago[deleted]
- CrystalGamma 9y agoI do the same with man instead (even though I only used that program like 50 times the last year) … it even happens in any other program where you can input text …
- tejasmanohar 9y agoYes, I do this all the time with all sorts of commands.
- splaty 9y agoNot this, but I do fairly often think assume I'm in vim when I'm not. `alias :q="echo NOT IN VIM!!!"`
- Sir_Cmpwn 9y agoNot just `alias :q exit`?
- emodendroket 9y agoMy favorite one of these is typing ctrl-w (cut in emacs) in a browser tab as I am editing a bunch of text in a text box.
- steinuil 9y agoI use vimperator, so the only program I use a lot which still doesn't recognize ctrl+w is Hexchat. My friends have gotten used to see me part the channel and rejoin shortly after, cursing my fingers.
- wlkr 9y agoHexchat closing on C-w is such a pain! It can't be scripted away either because it's hardcoded in the source. I haven't looked into this for some time but there does seem to have been some updates. https://github.com/hexchat/hexchat/issues/397 https://github.com/hexchat/hexchat/issues/397
- deleted 9y ago[deleted]
- mwgalloway 9y agoI totally do this. I also occasionally will have something breaking and soon realize I typed 'git' randomly in the middle of a file instead of in my terminal...
- temporallobe 9y agoI do stuff like because I alt-tab a lot and have so many similar-looking windows open. It's not just me either, I have seen stuff like "git pull" posted in chat rooms followed by "oops wrong window".
- martin-adams 9y agoThe one I do is `git clone ` then paste in the repository URL from bitbucket, and end up with `git clone git clone https://....` https://....` I don't think that can be solved here though.
- rvanmil 9y agoHah! Bitbucket drives me nuts in many ways but this one truly is the worst!
- DiThi 9y agoCertainly. The user is either used to typing "git clone" or is using a GUI where you input the repo URL. How bitbucket does it would only be fine if you only use bitbucket or if everybody did it that way.
- Gaelan 9y agoI do that all the time, often with package managers (npm install npm install foo)
- hinkley 9y agoCTRL-u CTRL-v
- martin-adams 9y agoNice! Never knew about CTRL+u. Thanks.
- DiThi 9y agoIt's so far from my left hand I prefer to press ctrl+w twice. (yes, I use the mouse a bit too much)
- mamcx 9y agoSomething I have noted as part of my venturing into mechanical keyboards lead me to the revelation that many of my "mistakes" were really the keyboard failing me (ie, not properly register my keystrokes). All my life I assume was me the idiot that not know how use it. Only after I pay attention to how I use the keyboard (looking at my hands for a while) I start to see this. So, I need to more firmly hit the keys in my actual driver (MS Ergo Keyboard) and now building my own mech... P.D: ie: Maybe one of the different mech switches are more suited to the way YOU type: http://www.wasdkeyboards.com/mechanical-keyboard-guide http://www.wasdkeyboards.com/mechanical-keyboard-guide --- P.D 2: This is a reply to all the ones that state that type wrong some commands. Also, and maybe more common, is just bad typing. I was far worse before the use of the MS Ergo Keyboard (it DEMAND to use both hands.) So, if the performance change by keyboards (happend to me) maybe is a indication that are the tools at fault here..
- Osiris 9y agoThis happens to me all the time on the new Macbook keyboard, especially with the arrow keys. I can watch myself press the key and see nothing happen. I really need to switch to a good external Mac keyboard.
- randiantech 9y agoIt happens to me when cloning a repo. Sometimes I just write git clone ..., go to browser and the command already contains git clone, then i end up having sth like git clone git clone ...
- randallsquared 9y agoOften, yes.
- chasedehan 9y agoI do it all the time, but never thought it was the problem. Most often its to look up a reference number for a commit, Then I get distracted on HN ...
- Bromskloss 9y agoLeave the computer? No, never.
- __s 9y agoSurprised how many are affirming this. Kind of a DAE moment. My fingers are a bit more tame from having spell check disabled & not falling back on these typo-aliases, as shown by the author's other aliases. Especially their t-prefix aliases which imply zsh aliasing gi to git
- manojlds 9y agoSometimes, while copy pasting.
- jeffhuys 9y agoNo. I have aliases for most things git: gs = git status ga = git add gc = git commit gp = git push gl = git pull gt = git tag
- dbrgn 9y agoI never started with those two-letter aliases because they're bound to become problematic: - gs is ghostscript - gc is a component of graphviz ...and all of a sudden your text editor can't generate PDFs anymore when started from the shell. Instead, I use four-letter aliases which work fine: - gits = git status - gitd = git diff - gitc = git commit ..etc
- hesselink 9y agoI aliased 'g' to 'git'. Combined with git aliases ('st' for 'status' etc) this is almost as short but doesn't steal all the short names from your shell. So instead of 'gs' you have 'g st'. Upside is you save two letters even on uncommon git commands :)
- haylem 9y agoI sometimes do, though not specifically with git. Can be emacs, can be ls, can be anything where I interrupt my thought process. So... I really fail to see why this article is of any relevance at all, really. Or at least a more global solution would have been better, but I think it's not really an annoyance. For me, it's the same as wanting to fix a UI so that I wouldn't re-double-click a software that I've already started (well, some prevent it, and generally when they do, it means there are sessions, and it annoys me).
- INTPenis 9y agoThe author seems to have a lot of issues with spelling. Everyone is different. I know an electrical engineer who grew up with dyslexia. So everyone finds their own solutions. Personally I very rarely spell things wrong in cli.
- joekrill 9y agoI do it fairly often.