News for hackers. Stuff that matters.
Re:Extremely Linear Git History by turtleyacht on Tuesday November 22, 2022 @08:21PM (#33713876)
First time I've seen aliases using other chars other than a-z; care to share your dotfiles?

It's a neat trick to explode your alias namespace, since you'll never see a tool published named `ls-` So you have reserved a huge "address block" for your personal aliases :)

Re:Extremely Linear Git History by couchand on Tuesday November 22, 2022 @08:32PM (#33713961)
I'd read the GP as saying a git alias and was struggling to understand how that's better than git show...
Re:Extremely Linear Git History by cerved on Wednesday November 23, 2022 @04:12AM (#33716862)
I'd be happy to, this is (roughly) my git config.

https://github.com/CervEdin/gut/blob/config/.gitconfig

NB, that some are personal custom scripts, like git-branch-status, which I also publish in the same public repository.

It's very much opinionated and geared to my use but feel free to use it, submit feedback and/or PR

Re:Extremely Linear Git History by turtleyacht on Wednesday November 23, 2022 @03:35PM (#33724186)
Thank-you. I collected some from kristopolous recently [1] too.

I see d- there, so the one use of dash is used sparingly. There's a lot of git functionality I'm leaving on the table, looks like. Maybe I'll collect them as needs arise, and at least try to learn a new one a week.

I'm proud to have carefully incorporated commits from a separate repo to another as a series of patchsets instead of just copy-pasting the lot. Authorship matters, and it let me fix some issues coming in.

Currently, I'm using a shell script to help with a git conflict resolution flow that does something like

    read -p 'Conflict. Resolve and press [Enter]'
And fix in a separate tmux window (git add, git cherry-pick --continue).

TUIs and autocomplete are nice, but there's opportunity for a deeper understanding writing one's own tools. So I'm hoping to combine ZZ and `read -p` (or similar) to coax nvi (Keith Bostic) to something for Java stuff. Or at least build some primitives around that.

Encountering the equivalent of "flash of unstyled content" when switching from text editor to a--for example--Java method chooser feels like the philosophical difference between "Let's SPA" versus "Click flashes between pages is fine."

The flow would be something like

  1. In nvi, keystroke equivalent of
     Ctrl-Space brings up an Intellisense
     tool.
  2. The tool loads up a list of
     autocomplete methods as well as its
     own hotkeys.
  3. Pressing up and down manipulates a
     temporary text file that just prepends
     ">" next to the line, for example.
  4. And Enter somehow brings back nvi with
     the method added, right after the
     period (with our partial typing
     replaced).
All this to say, dotfiles and git config are no big deal, but in CLI it's an escape hatch to molding a custom environment.

[1] https://news.ycombinator.com/item?id=33628204