fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

10K
active users

#fzf

1 post1 participant1 post today

#git tip of the day. Massive time saver.

Add this alias to your config:
`lg = log --format='%C(red)%ad %C(green)%h %C(blue)(%an): %Creset%s%C(Yellow)%d' --date=format:'%d-%m-%y'`

It’s basically `git log —oneline` + date and author and pretty colours.

Now you can combine it with #fzf to filter the commit history:
`$ git lg | fzf`

The only issue is that the results won’t be sorted chronologically, but it’s so much faster than stuff like #gitlens

Today I learned: you can use `bind -x` to make bash execute code whenever you type some key chord.

Example: get CTRL-o to fuzzy-find a file. (using #fzf ❤️ )

```bash
bind -x '"\C-o": xdg-open $(fzf --height 50% --reverse)"
```

My *very* current setup is bit more than this, since I might want to jump
to a folder, and since my muscle memory is used to `C-x C-f` to
find-file under #emacs

```bash
bind -x '"\C-x\C-f": find_file "$(fzf --preview "bat --style=numbers --color=always --line-range :500 {}" --walker=file,dir,follow,hidden --height 50% --reverse)"'

find_file() {
echo
if [ -f $1 ];
then
echo "Opening "$(tput bold)$(tput setaf 2)$1$(tput sgr0) && history -s xdg-open $1 && xdg-open "$1" && xdg-open "$1";
elif [ -d $1 ];
then
cd "$1" && echo "Now at "$(tput bold)$(tput setaf 2)`pwd`$(tput sgr0);
fi
}
```

Going through and cleaning up my (a command-line fuzzy finder) shell integration notes this week.

Came across a great series of articles I had forgotten about this great introductory series to fzf and and customisation. Highly recommend if you are getting started with fzf.

thevaluable.dev/practical-guid

The Valuable Dev · A Practical Guide to fzf: Building a File ExplorerMany CLIs are general enough to be powerful in many situations; fzf is a good example. Fast, highly customizable, it answers many needs.

I use a lot of git worktrees in my workflow. Using #magit there's a quick way to navigate between worktrees "Z g".

In the terminal we can do something like:

```fish-shell
cd (git worktree list | choose 0 | fzf)
```

I do use zoxide, but that doesn't work for the first time we want to navigate to the new directory.

Please note, you'll need to install:
- github.com/theryangeary/choose
- github.com/junegunn/fzf

GitHubGitHub - theryangeary/choose: A human-friendly and fast alternative to cut and (sometimes) awkA human-friendly and fast alternative to cut and (sometimes) awk - theryangeary/choose

Integrating jj-fzf into Emacs
testbit.eu/2025/jj-fzf-in-emac

“Built on jj and fzf, jj-fzf offers a text-based user interface (TUI) that simplifies complex versioning control operations like rebasing, squashing, and merging commits. This post will guide you through integrating jj-fzf into your Emacs workflow, allowing to switch between emacs and jj-fzf with a simple key combination.”

testbit.euIntegrating jj-fzf into Emacs | Timj’s bits and tests

🚀 New #Blog Post about JJ-FZF!

This post goes into the details of all new features in #jj-#fzf 0.25.0, usability improvements, compatibility issues, deprecation and also breakage. Better jj-log integration, a new script for email patches, an #Emacs hook for auto-snapshots, jj-describe with content diff, the new Evolog browser, privacy markers, and more...

The full blog post:
testbit.eu/2025/jj-fzf-0.25.0

And happy committing! 🎉

#jjfzf#jujutsu#git

💡 Just released #jj-#fzf 0.25.0! 💡

💻 Ctrl+T: Dialog to browser Evolog
💉 Alt+J: Inject/recreate historic commit
📝 Ctrl+D: Describe now shows content diff
🧹 jj-undirty.el: Auto-snapshot in #Emacs
🏁 Alt-Z: Subshells now run in repo root
🌟 New PRIVATE commit markers added

Full announcement:
github.com/tim-janik/jj-fzf/re

Have Fun - Feedback Welcome!

GitHubRelease 0.25.0 · tim-janik/jj-fzfJJ-FZF 0.25.0 - 2025-01-23 Added: Fzflog: use jjlog unless jj-fzf.fzflog-depth adds bookmark ancestry Use author.email().local(), required by jj-0.25 Absorb: unconditionally support absorb Evolog:...
#jjfzf#Git#vcs