Code Monkey home page Code Monkey logo

Comments (6)

seqizz avatar seqizz commented on May 22, 2024 1

Huh, apparently there is something going on with firefox, I was able to open chat with chromium, nevermind 👍

Thanks for the suggestions, dcd is so close to it, but there is a slight catch here I guess:
Currently there is no way to "just print the filename after I choose over TUI".

I've defined following verb:

[[verbs]]
name = "print"
invocation = "_"
execution = "echo {file}"
# leave_broot = false # this didn't work as I expected here anyway :)

and triggered it via broot --cmd "myfile :_", it successfully printed the first match, but I what I'm trying to achieve is to be able to select on the terminal (since my target can be another match which I can see when I run broot --cmd "myfile") so broot can echo that file's name when I enter and quit.

Or maybe I should ask something else. Can I assign "enter" to another verb? 😄

from broot.

Canop avatar Canop commented on May 22, 2024

To do this you need to use the shell integration (see https://dystroy.org/broot/documentation/installation/#installation-completion-the-br-shell-function )

You could also define a function directly opening a file with a fuzzy name (calling br --cmd "yourname :e").

It's very similar to what I do go to dirs with dcd: https://dystroy.org/broot/documentation/tricks/#dcd-deep-fuzzy-cd

As for the chat link I'm surprised it doesn't work for you. There are already people discussing in https://miaou.dystroy.org/3490

from broot.

Canop avatar Canop commented on May 22, 2024

Do I correctly understand that the remaining problem is that you know have to type :_<enter> instead of just doing <enter> ?

And that the problem wouldn't exist at all for you if you could configure the verb mapped to <enter> on files ?

from broot.

seqizz avatar seqizz commented on May 22, 2024

Do I correctly understand that the remaining problem is that you know have to type :_<enter> instead of just doing <enter> ?

I am not sure what you mean by that, so I'll go with no :) I'll try again.

What I wanted get from broot is: In some way, after I press enter on the selection window, it exits and prints the path of selected file to the stdout. Nothing more.

I assume dcd would benefit from that also. Instead of "I'm feeling lucky" mode, you can run dcd foldername and broot can open its interface to show you all matching folders and let you select the one you'd like to cd into.

And that the problem wouldn't exist at all for you if you could configure the verb mapped to <enter> on files ?

Yes, this way I can map enter button to "echo {file}" so it should work anyway.

Thanks for the patience 😄

from broot.

Canop avatar Canop commented on May 22, 2024

This related issue might clarify things: #25

Note that the problem with termion might be solved in a near future as I'm currently rewriting broot to use crossterm instead of termion (and by the way allow windows compatibility).

from broot.

seqizz avatar seqizz commented on May 22, 2024

Aaah alright. That's exactly what I meant.

I thought it should be trivial since its just printing a generated string to stdout, didn't realize a deeper library problem.

I'll follow the other issue then, thanks! :)

from broot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.