Code Monkey home page Code Monkey logo

choose's Introduction

choose

GitHub release (latest by date)

Fuzzy matcher for OS X that uses both std{in,out} and a native GUI


Animated Screenshot

Install

For the latest release, go to the releases section and download the binary.

Homebrew installation

Keep in mind that we do not maintain the homebrew formula here! So check the version you have via choose -v and compare it to the latest version in the releases section .

brew install choose-gui

Build and Install Documentation

From root of repository, run:

make docs
make install-docs

You can then issue man choose to read the manual.

Note that this requires pandoc to be installed on your system to build the manual page.

Usage

List the content from current directory

ls | choose

Open apps from the applications directories

ls /Applications/ /Applications/Utilities/ /System/Applications/ /System/Applications/Utilities/ | \
    grep '\.app$' | \
    sed 's/\.app$//g' | \
    choose | \
    xargs -I {} open -a "{}.app"

License

See MIT LICENSE.

choose's People

Contributors

chipsenkbeil avatar garretcarrot avatar jonstoler avatar liamdawson avatar moretticb avatar nightmachinery avatar przprz avatar sdegutis avatar szymonkaliski avatar vlermandac avatar yoavg avatar yshym avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

choose's Issues

Feature idea: remember (or set) position

I'm playing around with choose. It's pretty cool, but what would increase coolness by 1000% is if one could control the position of the choose box on the screen. E.g., I'd want it in the upper left corner of the screen.

Currently, it can be dragged anywhere, but the position is not remembered between launches.

Perhaps a cmdline flag to set the screen coordinates of the box's northwest corner. E.g., ls | choose --location=0x22. At least this way, one won't have to mess with storing the position in a preference plist.

Low-contrast in light mode makes text unreadable

Choose seems to pick dark mode or light mode based on what's behind it on the screen (I guess?). Dark mode is OK, but light mode has low contrast between text and background for the non-selected items and I can barely read them.

I see there's a new 1.1 release but it's not on homebrew yet it seems so I can't easily test the new CLI options yet. I'm using 1.0 currently.

Screenshot on 2020-06-05 at 09-22-15

Find/Execute apps as a default option or as an example in the readme

Hi, thank you for creating choose! I've been enjoying it a lot and is the best minimal selection tool that is native for macos. The main usage I give it is to open apps and run scripts. I couldn't believe that others apps charge for that second feature.

In that regard, there are 3 different directories where the apps are. The 'Application' folder you see in finder is a lie, it doesn't have any symlinks but the files inside may have different paths.

May be beyond the scope of the project, but with just a one liner you can list apps from your system in choose without the '.app' extension, and run them with the macos 'open' command (it can also run scripts. I didn't notice time differences with running scripts the normal way). So I thought that having that option out-of-the-box might be useful for some people.

Again, I know that it might defeat the purpose of minimal stdin/stdout selection, but it would be great if you think is ok to at least add it to the examples section in the readme file. I'd happily make a PR for that :)

Building empty man pages

Following the instructions to build the documentation initially failed on my system. Installing dos2unix and trying again fixed the issue.

Change Font (Or general Config)

This is wonderful!
But Could you add personal config to this program? Like the font and the background?
Thank you so much!

Release a new version

Currently there is only one release which is also used from brew. With that version, features like the changing the background color are inexistent.

Could you do a new release with the actual state of the code?

Thanks! ๐Ÿ˜Š

Execute command on select

A feature I'd like is to be able to execute a command upon selecting from choose. The reason is that I currently leverage the existing choose program to pipe in choices from pass that I can select to copy to my clipboard.

The problem is that there is a bit of a delay from when I select from choose and when pass is able to copy to my clipboard. If I can execute directly from choose, I can provide a spinner or some indicator that it is still processing, rather than accidentally sending the wrong clipboard contents to some other application because I moved too quickly.

allow for multiple selection

It would be cool if we could select multiple elements, and choose would return them separated by newline, something like using -m and tab with fzf:

screen shot 2015-03-22 at 10 53 40

Support pre-populating query text

Add a command line flag that allows pre-populating the query with some text. For example:

ls | choose -q ie

Would open choose with "ie" as the query text like so:

image

Maintainer

@sdegutis, I can maintain this, although I may deprecate functionality I don't use to simplify the repo. I (and several others I know) use the CLI interface for quite a few tools like feeding in password selection from the www.passwordstore.org tool.

[FR] Allow to trigger choose with empty list and other requests...

Hi, and thanks for a very cool app. I have been trying to adapt some of my workflow from linux (using rofi) to Mac, and choose has made it possible to great extent.

  • I would like to request to be able to trigger choose without piping in any list of options. This is so I can use it in scripts to capture simple text. Basically, I want to be able to get just the entry box with $ choose -m.

  • Also to have to option to paste text from the clipboard.

  • Finally, to have the option to display the number of matches.

Thanks in advance!

Any way to use this tool to keep navigating through folders?

I would like this tool to be used for writing a path and return that path. The idea is to be triggered and the user could write a path that will be fuzzy searchable. This mostly to make it easy to use the output for using an editor to open the final path.

???? | choose | open_with_editor $1

So, the idea is to have something like Alfred/Raycast/Rofi that you could write and find paths.

Search results not the most relevant

Hi,

First thanks for this helpful tool.
Second, I feel that how the search is performed is not that great. Consider having the following 2 lines:
* ssh server target ServerAliveInterval=50 -o StrictHostKeyChecking=no jumper host
* dns nameserver dhcp start --gateway subnet
Now if you search by 'ssh' you will get the second line in first which shouldn't be the case since there's no 'ssh' word in it. Also if you search for 'ssh target' still it won't get the 1st line which contains both tokens 'ssh' and 'target' to be displayed on top. Any ideas ?

Also I'm willing to support this project!

[FR] ability to remap keys for navigation to resemble fzf

I would like to -- short of having to hack the code and compile from source -- be able to map the UP and DOWN bindings to ^K and ^J respectively. This is for us who have fzf(1) keybindings burnt into our fingers.

(I could have a go at adding this functionality myself, especially if we can think of a clean way to exposing this functionality and we're short of time.)

Make choose non-blocking

choose is a great app! However, unlike (for example) fzf, it is blocking. What this means is that if you pipe to choose, it will not open until stdin closes. If, for example, you run ls -R ~ | choose - which for many people is a long operation - no results are shown until ls is complete. It would be great if choose could dynamically update like fzf does.

Thanks for your work on this great program.

[FR] Long hand flag names

Currently, there are only short flags used to pass into choose, would it be possible to have long hand flags with double dash -- to improve the readibility?

Added to nixpkgs

Greetings!

Just an FYI, I've added this great tool to nixpkgs: NixOS/nixpkgs#288931

Please let me know if this is an issue ๐Ÿ˜„ Will be closing this since it's not really an issue.

Thanks!

feature request: return string for non-items

First of, I'd like to say huge thanks for writing 'choose'. I am coming to OSX from Linux (with dmenu) and was looking all over the place for something like this. So, thanks! this is really really helpful, and working great.

There is one small capability I am missing, though:
When I type in a string that does not match any of the items on the list, and then press "Enter",
I'd like 'choose' to not perform cancel, but instead to return the string that I entered. If I wanted to cancel, I could still do it using the Esc key. This way, I could distinguish between two cases:
(1) I canceled because I changed my mind
(2) I did not find the item I was looking for, which was actually string X.

It looks like a tiny change (changing line 459 to write the queryField instead of canceling?), but unfortunately I don't know Objective-C at all and am afraid I'll be missing something.
Also, I really don't want to install the full-blown xcode suite just for this :(

Thanks again for your consideration!

more GUI options

I think it would be great if we had more options with controlling colors in choose, now some of them are hardcoded, which blocks some ideas for customising, I think we should add options like this:

  • set color of choose window (so we could create dark background one)
  • set alpha channel of all colors, not just RGB value
  • change icon next to input field (maybe just as a string, with UTF-8 there's lots of options to use different arrows)

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.