Live data from Hacker News

Git git git git git

caiustheory.com

151–160 of 244 posts

Re: Git git git git git

#151

>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.

I 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.

Personally, I don't want my typos corrected when I enter commands. I prefer the negative reinforcement to encourage fewer errors. I also don't mind an occasional error.

Not hatin. Just wondering if I'm alone.

Re: Git git git git git

#152

Earlier quoted context omitted.

I 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.

Personally, I don't want my typos corrected when I enter commands. I prefer the negative reinforcement to encourage fewer errors. I also don't mind an occasional error. Not hatin. Just wondering if I'm alone.

I'm the same, though I create tiny aliases for commonly typed commands. gp = "git pull", and so on.

Re: Git git git git git

#153
post #149

Earlier quoted context omitted.

I 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.

I just alias 'pull' to git pull, it's much nicer. Also 'push' and a few of the other most common ones.

Or alias to gp, gl, gd, ga, gmv, grm, gsh, glg, gcm, gcam, gpuo, gdwd, gpuom, ...

Re: Git git git git git

#154

Earlier quoted context omitted.

I 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.

Personally, I don't want my typos corrected when I enter commands. I prefer the negative reinforcement to encourage fewer errors. I also don't mind an occasional error. Not hatin. Just wondering if I'm alone.

You probably aren't alone, since commands that punish you when you mistype exist. Check out sl[0] or gti[1].

[0] https://github.com/mtoyoda/sl [1] http://r-wos.org/hacks/gti

Re: Git git git git git

#156
post #35

Earlier quoted context omitted.

I 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").

Most shells now support a bracketed paste mode. zsh: https://github.com/zsh-users/zsh/commit/98687fa1dec803f041cb..., bash: https://www.gnu.org/software/bash/manual/html_node/Readline-... (enable-bracketed-paste)

Re: Git git git git git

#157

Earlier quoted context omitted.

I 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.

I always typed rebnoot, so I patched Netbsd to allow rebnoot. Then I patched it still so it would say, "Rebnooting". Fun times.

"Rebnooting" sounds like it should be a real word; probably a military term.

Re: Git git git git git

#159
> git config --global alias.git '!exec git'

Is the exec really required?

   git config --global alias.git '!git'
Will also work. Am I missing something?

EDIT: From git doc, "If the alias expansion is prefixed with an exclamation point, it will be treated as a shell command"

So exec is not required then.

Re: Git git git git git

#160
post #154

Earlier quoted context omitted.

Personally, I don't want my typos corrected when I enter commands. I prefer the negative reinforcement to encourage fewer errors. I also don't mind an occasional error. Not hatin. Just wondering if I'm alone.

You probably aren't alone, since commands that punish you when you mistype exist. Check out sl[0] or gti[1]. [0] https://github.com/mtoyoda/sl [1] http://r-wos.org/hacks/gti

Ha -- both are amusing.
Post reply on HN