Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run shell commands like tar and zip directly through broot terminal UI. #873

Open
sohan-deshar opened this issue Apr 25, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@sohan-deshar
Copy link

Hi all.
I couldn't find anything mentioned in the docs regarding the ability to run simple shell commands like tar and zip.

It would be nice to have such features (if there already isn't a way to do it), so that I won't have to leave broot.

@sohan-deshar sohan-deshar added the enhancement New feature or request label Apr 25, 2024
@Canop
Copy link
Owner

Canop commented Jul 21, 2024

In my experience, there aren't so many cases when you run a command just taking the current file as path. You often need to pipe, or to specify another path.

For simple cases, a verb like this can be defined:

    {
        invocation: "exe {command}"
        external: ["bash" "-c" "{command} {file}"]
        leave_broot: false
    }

This allows typing eg :exe touch or :exe chmod +x and have the command applied to the selected file.

But in practice I'd just define the very few verbs for those actions.

(still interested with feedback on this)

@adriangalilea
Copy link

For simple cases, a verb like this can be defined:

    {
        invocation: "exe {command}"
        external: ["bash" "-c" "{command} {file}"]
        leave_broot: false
    }

This allows typing eg :exe touch or :exe chmod +x and have the command applied to the selected file.

But in practice I'd just define the very few verbs for those actions.

(still interested with feedback on this)

I would like to run add on from my functions sourced on .zshrc so when I do :exe add it fails since it doesn't exist in that context, however if I remove "bash" "-c" it does not work.

What options do I have besides sourcing inside sub-shell?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants