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:

9.9K
active users

#magit

3 posts3 participants1 post today
Continued thread

perplexity.ai/search/i-wish-to

忘了分享這則對話。

基本上我要它做一個 interactive function 給我,能夠吃 "ghq list -p" 然後然我以 fuzzy search 的方式選一個路徑,然後要用 magit 去打開我所選的路徑。

基本上第一個答案給的就已經是可動而且是 minimum implementation,沒有一來如 ivy 或 helm 那種外部的函式庫。

fuzzy search 的部分是中途增加的,也是沒有是使用外部函式庫。

我後來手動把這段

(split-string (shell-command-to-string "ghq list -p") "\n" t)

調爲

(process-lines "ghq" "list" "-p")

主要是 error handling 較好 (shell command 可能會出錯)。

但基本上沒什麼不乖的(?)地方了。

#emacs#elisp#magit

Sucks that adding 3000 line test files to a git repository slows down but there is no better tool for working with git.

Wish I didn't have to add such files to my test suite but need a "real world" example to test against.

Replied in thread

@jefframnani I totally agree! I have slowly forgotten how to do certain things from the command line. And what's more, there are things I never did on the command line, but which are extremely easy with Magit. Staging hunks, for example, or, doing an interactive rebase.

Late boarding the #magit train! 🎩 ✨ Things are looking great so far! (I'm two days in.)

Big thanks to Marius Vollmer for starting it all, as well as to the maintainers both current (Jonas Bernoulli, Kyle Meyer, and Noam Postavsky) and past (Nicolas Dudebout, Peter J. Weisberg, Phil Jackson, Rémi Vanicat, and Yann Hodique) and the many, many contributors!!!!!! ❤️ 🤗

By searching around I found a lot of love from the community in the form of tutorials for some of the basic (and not so basic) functionality, which is really heartwarming ❤️ 😍

Some specific things are still not clear to me, but hopefully I will be able to iron them out with a bit of time...

For example, it's not clear to me how to split a commit other than the most recent one in local history.

My ridiculous workaround has been to reorder the local history to put the target commit last, then split it by resetting the latest commit, then again reordering the commits to put the pieces where they belong in history. But there's I know that there's gotta be a better way...! 🤔

If anyone here has a suggestion of a tutorial or vade-mecum workflow, I am very interested!

Good week, and stay sane folks =)

I was adding #magit todo to my #Emacs config today. Seeing that magit also dropped dash I tried to port it away from dash. First off all understanding as quite hard since it looks out of place. Anyway I got most out of the way but the thing I'm not sure of is to replace --> and group by. I know there are thread macros but there isn't a replacement for thread-first-all. Any ideas?
That's what I have so far:
github.com/alphapapa/magit-tod

GitHubCommits · alphapapa/magit-todosShow source files' TODOs (and FIXMEs, etc) in Magit status buffer - Commits · alphapapa/magit-todos

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