Live data from Hacker News

Git git git git git

caiustheory.com

161–170 of 244 posts

Re: Git git git git git

#161

I want a terminal that highlights things it thinks are off. Like when I type cd cd or git git. But I don't want it to auto fix nor wait until the command is issued to complain. This is because I want to be the sole controller of what command is actually issued. Call me an old curmudgeon but I just don't trust the auto fix solutions. Edit: had no idea about Fish. Thank you, all.

Hey, don't forget about zsh with a highlighting plugin! :)

I'm using this without problems, and it's so comfortable to see the red highlighting when you mistyped: https://github.com/zdharma/fast-syntax-highlighting

Re: Git git git git git

#162
post #75

Earlier quoted context omitted.

What kind of evil system ships with both vi and vim?

OpenBSD comes standard with vi. Vim is a package.

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

Re: Git git git git git

#163
post #63

Earlier quoted context omitted.

Not this, but I do fairly often think assume I'm in vim when I'm not. `alias :q="echo NOT IN VIM!!!"`

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

You can try Lazarus form recovery[1] to mitigate your pain. It locally saves the content of forms and allows you to pull it back.

[1] https://addons.mozilla.org/en-US/firefox/addon/lazarus-form-...

Re: Git git git git git

#164

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

I don't think you are missing anything, good catch.

Re: Git git git git git

#166
post #63

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

Not this, but I do fairly often think assume I'm in vim when I'm not. `alias :q="echo NOT IN VIM!!!"`

I actually aliased :q to clear:

https://github.com/jez/dotfiles/blob/master/util/aliases.sh#...

I also have clera, lcear, and lcera -> clear, and :tabe -> vim.

Re: Git git git git git

#168
post #101

Earlier quoted context omitted.

Non-idempotent options are always unsafe; safe operations are a subset of idempotent operations. (I suspect you meant “safe” in a different sense, but I couldn't resist.)

> safe operations are a subset of idempotent operations Definitely not. 'Safe' means too many things in different contexts to make sweeping statements like that. Here's one i came across recently. You are interacting with a stock exchange. You have sent an order to buy 100 shares of Twitter stock at some price, and it is now resting on the order book, waiting for orders to sell at that price. You see that the charact…

> That's still not as good as the non-idempotent message.

Only if you can be sure the non-idempotent message arrived. It's not safe to re-send the delta message.

Re: Git git git git git

#169

Earlier quoted context omitted.

It’s probably just a shell script or an alias

An alias would work but it wouldn't say rebnooting. That was my initial fix. But I was learning things at the time and I learned how to recompile parts of the distribution. I also learned how programs in Unix could invoke different effects based on name. Coming from DOS, it was a real surprise that reboot was a link to shutdown.

So I am assuming you ended up patching the `shutdown` binary to print `Rebnooting` if exec'd with the `rebnoot` name?

This is similar to how busybox binary implements a bunch of the tools from coreutils etc.

Re: Git git git git git

#170

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.

It's not only commands. My spelling skills took a dive, as google got better and better in guessing what I actually want to search for.

Can you disable that feature somewhere ? The suggestion is good, but automatically doing the corrected query is not!

Post reply on HN