Canop / broot

A new way to see and navigate directory trees : https://dystroy.org/broot
MIT License
10.39k stars 226 forks source link

shell command without quitting #802

Closed joihn closed 8 months ago

joihn commented 8 months ago

I wish I could execute shell command without quitting broot I tried:

    {
        invocation: "my_verb"
        execution: "echo this_is_my_awesome_verb"
        from_shell: true
        leave_broot: true
    }

however when starting broot:

Bad configuration: invalid verb conf: You can't simultaneously have leave_broot=false and from_shell=true
joihn commented 8 months ago

found a workaround :D

    {
        invocation: "path_copy"
        execution: "bash -c \"echo this_is_my_awesome_verb_from_bash\""
        from_shell: false
        leave_broot: false
    }

and my final application, if anyone is interrested: an xclip powered path_copy which does not imply recompiling broot:

    {
        invocation: "path_copy"
        execution: "bash -c \"echo -n {file} | xclip -selection clipboard;\""
        from_shell: false
        leave_broot: false
    }