Live data from Hacker News

I found a useful Git one liner buried in leaked CIA developer docs

spencer.wtf

41–50 of 273 posts

Re: I found a useful Git one liner buried in leaked CIA developer docs

#41

So effectively "I just discovered xargs"? Not to disparage OP but there isn't anything particularly novel here.

This feels like gatekeeping someone sharing something cool they've recently learned.

I personally lean more towards the "let's share cool little productivity tips and tricks with one another" instead of the "in order to share this you have to meet [entirely arbitrary line of novelty/cleverness/originality]."

But each to their own I suppose. I wonder how you learned about using xargs? Maybe a blog-post or article not dissimilar to this one?

Re: I found a useful Git one liner buried in leaked CIA developer docs

#43

Earlier quoted context omitted.

Can you explain TUI? I have never heard this before

Eg: lazygit https://github.com/jesseduffield/lazygit?tab=readme-ov-file#... https://github.com/sxyazi/yazi https://github.com/darrenburns/posting or I guess Vim would be a prominent example. Peoples definitions will be on a gradient, but its somewhere between CLI (type into a terminal to use) and GUI (use your mouse in a windowing system), TUI runs in your terminal like a CLI but probably supports "graphical widgets"…

So the acronym is for Terrible User Interface? ;)

Re: I found a useful Git one liner buried in leaked CIA developer docs

#45
I've had this in my ~/.bash_aliases for awhile:

  alias git-wipe-merged-branches='git branch --merged | grep -v \* | xargs git branch -D'
Trying to remember where I got that one, as I had commented the following version out:

  alias git-wipe-all-branches='git for-each-ref --format '%(refname:short)' refs/heads | grep -v master | xargs git branch -D'

Re: I found a useful Git one liner buried in leaked CIA developer docs

#46
post #13

Earlier quoted context omitted.

That's handy! I just started using oh-my-zsh and I feel like I know about 4% of useful things it can do so far.

"trapd00r" is the theme you want, if only because the name is cool

I change themes just often enough to completely forget how to do it and also forget whatever other adjustments I had to make to it all work. And like... is my config versioned somehow? This is a long way to say, Thank You for inspiring me to look at all that stuff again!

Re: I found a useful Git one liner buried in leaked CIA developer docs

#47
post #37

Earlier quoted context omitted.

Can you explain TUI? I have never heard this before

[flagged]

They aren’t the same thing. TUI refers to interactive ncurses-like interfaces. Vim has a TUI, ls does not

I’m fairly certain this terminology has been around since at least the early aughts.

Re: I found a useful Git one liner buried in leaked CIA developer docs

#48
We all have something similar, it seems! I stole mine from https://stackoverflow.com/questions/7726949/remove-tracking-....

I also set mine up to run on `git checkout master` so that I don't really have to think about it too hard -- it just runs automagically. `gcm` has now become muscle memory for me.

  alias gcm=$'git checkout master || git checkout main && git pull && git remote prune origin && git branch -vv | grep \': gone]\'|  grep -v "\*" | awk \'{ print $1; }\' | xargs -r git branch -D'

Re: I found a useful Git one liner buried in leaked CIA developer docs

#49
post #2

I currently have a TUI addiction. Each time I want something to be easier, I open claude-code and ask for a TUI. Now I have a git worktree manager where I can add/rebase/delete. As TUI library I use Textual which claude handles quite well, especially as it can test-run quite some Python code.

how do you trust the code claude wrote? don't you get anxiety "what if there's an error in tui code and it would mess up my git repo"?

Re: I found a useful Git one liner buried in leaked CIA developer docs

#50
post #29

Earlier quoted context omitted.

Can you explain TUI? I have never heard this before

Terminal User Interface, contrasting with a Graphical User Interface (GUI). Most often applied to programs that use the terminal as a pseudo-graphical canvas that they draw on with characters to provide an interactive page that can be navigated around with the keyboard. Really, they're just a GUI drawn with Unicode instead of drawing primitives. Like many restrictions, limiting oneself to just a fixed grid of colored…

I prefer tui's for two reasons. 1. Very used to vi keybindings 2. I like low resources software. I love the ability to open the software in less than a second in a second do what I needed using vi motions. And close it less than a second.

Some people will be like you save two seconds trying to do something simple. You lose more time building the tool than you will use it in your life.

It's not about saving time. It's about eliminating the mental toll from having to context switch(i know it sounds ai, reading so much ai text has gotten to me)

Post reply on HN