chrisant996 / clink

Bash's powerful command line editing in cmd.exe
https://chrisant996.github.io/clink/
GNU General Public License v3.0
3.61k stars 142 forks source link

broot integration #673

Closed wincmd64 closed 1 month ago

wincmd64 commented 1 month ago

https://dystroy.org/broot/install-br/

I tried to install broot --install with powershell br alias work OK, but with clink - br does not work

chrisant996 commented 1 month ago

Does br work in CMD.exe without Clink? This sounds unrelated to Clink.

But there's not enough information; you need to share more information to enable troubleshooting, if you're sure this is a Clink issue.

For example, you said "br does not work". But what happens when you enter br? I understand that the desired result doesn't occur, but what happens instead? Does it print an error? What's the error?

I can't see your screen, so you'll need to share information to enable troubleshooting.

chrisant996 commented 1 month ago

This is a limitation of broot, and it's documented in the link you shared. It has nothing to do with Clink.

Quoting from https://dystroy.org/broot/install-br/:

"Supported shells today are bash, zsh, fish, nushell, and powershell."

Cmd is not any of those shells. Broot doesn't support cmd.

wincmd64 commented 1 month ago

In launcher folder there is a script. Maybe it can be adapted to clink ?

function br {
    local cmd cmd_file code
    cmd_file=$(mktemp)
    if broot --outcmd "$cmd_file" "$@"; then
        cmd=$(<"$cmd_file")
        command rm -f "$cmd_file"
        eval "$cmd"
    else
        code=$?
        command rm -f "$cmd_file"
        return "$code"
    fi
}
chrisant996 commented 1 month ago

Maybe. I don't know. But this has nothing to do with Clink. I recommend discussing it in a broot forum.

wincmd64 commented 1 month ago

https://github.com/Canop/broot/issues/941#issuecomment-2355769788

Maybe you can help with integration?

chrisant996 commented 1 month ago

Are you asking me to help? Or someone from broot to help? Or someone else to help?

This has nothing at all to do with Clink.

Broot needs CMD support, not Clink support. You don't need or want a Lua script, you need a .cmd script or something.

I'm not personally going to help with this, as it's not anything I will use, and it has nothing to do with Clink. I recommend discussing this in the broot forum.

chrisant996 commented 1 month ago

Once I looked into broot, it does seem like a nifty program. I probably won't use it myself, as its interface takes a lot of keypresses for the most often used things like changing to a directory. In contrast, for things like that the fzf integration in clink-fzf is more lightweight and has much of what broot provides, in a more integrated manner with the shell. E.g. Alt-C instead of brEnter, and fuzzy filtering in completions in general, etc.