{"id":33185570,"url":"https://github.com/thingsiplay/findpick","last_synced_at":"2026-04-05T11:33:56.125Z","repository":{"id":168251678,"uuid":"643789195","full_name":"thingsiplay/findpick","owner":"thingsiplay","description":"General purpose file picker combining \"find\" command with a fuzzy finder.","archived":false,"fork":false,"pushed_at":"2024-02-20T16:32:33.000Z","size":108,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-20T15:56:10.481Z","etag":null,"topics":["bash","file","find","fuzzy-search","fzf","linux","menu","path","pick","script","search","select"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thingsiplay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-05-22T06:55:51.000Z","updated_at":"2024-01-03T14:13:40.000Z","dependencies_parsed_at":"2024-04-20T16:00:06.303Z","dependency_job_id":null,"html_url":"https://github.com/thingsiplay/findpick","commit_stats":null,"previous_names":["thingsiplay/findpick"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thingsiplay/findpick","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thingsiplay%2Ffindpick","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thingsiplay%2Ffindpick/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thingsiplay%2Ffindpick/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thingsiplay%2Ffindpick/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thingsiplay","download_url":"https://codeload.github.com/thingsiplay/findpick/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thingsiplay%2Ffindpick/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31434624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T08:13:15.228Z","status":"ssl_error","status_checked_at":"2026-04-05T08:13:11.839Z","response_time":75,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","file","find","fuzzy-search","fzf","linux","menu","path","pick","script","search","select"],"created_at":"2025-11-16T05:00:20.095Z","updated_at":"2026-04-05T11:33:56.107Z","avatar_url":"https://github.com/thingsiplay.png","language":"Shell","funding_links":[],"categories":["\u003ca name=\"find\"\u003e\u003c/a\u003eFile finding (alternatives to find)"],"sub_categories":[],"readme":"# Findpick\n\nGeneral purpose file picker combining \"find\" command with a fuzzy finder.\n\n- Author: Tuncay D.\n- Source: https://github.com/thingsiplay/findpick\n- License: [MIT License](LICENSE)\n\n# Introduction\n\nOutput absolute fullpath of selected file. A frontend script to list files by\n[find](https://www.man7.org/linux/man-pages/man1/find.1.html) command, generate\nan interactive menu out of it with [fzf](https://github.com/junegunn/fzf),\n[rofi](https://github.com/davatorium/rofi) or other similar tools and write\nselected entry to stdout. Intended use case is similar to file picker dialogs\nin desktop environments, but with a search bar instead navigating through\nfilesystem. While `fzf` has first class support, other menu builder or filters\ncan be used instead too. \n\n## Why?\n\nThis program started out rather simple as an alias. My goal was to combine the\nsearch with a fuzzy finder menu and extend the output to an absolute path. The\nmany options and complex nature of `find` and the other commands made it hard\nto remember how everything worked. To make things easier with simple flags, I\nneeded to create a separate script. And here we are.\n\n# Requirements\n\nRequired GNU/Linux utilities, depending on what commandline options are enabled:\n\n```\nbash find touch rm cat sed grep sort fold ls file readlink realpath nohup xdg-open\n```\n\nIn example [nohup](https://www.man7.org/linux/man-pages/man1/nohup.1.html) or\n[xdg-open](https://linux.die.net/man/1/xdg-open) won't be needed, if the option\n`-r` isn't set at all. So these programs aren't hard requirements, rather soft\nrequirements the moment they are needed.\n\nOptional program used for menu building by default at `-m` command:\n\n```\nfzf\n```\n\n# Installation\n\nDownload the project directly from Github:\n\n```\n$ git clone https://github.com/thingsiplay/findpick\n$ cd findpick\n```\n    \nNow make the main program `fp` executable and put the file into a folder in the\n`$PATH` for easy access. Or run the script `suggested_install.sh` to automate\nthe installation process:\n\n```\n$ bash suggested_install.sh\n```\n\n## Packages\n\nDepending on your OS, some of the tools might be not installed on your system.\nAfter downloading and installing the main program from Github, you still need\nthe required utilities to run the script. Here is a list of commands for\nvarious Linux distributions, to get the most basic packages with the required\ntools installed:\n\n### Arch\n\n```\n$ sudo pacman -S bash coreutils base-devel xdg-utils fzf\n```\n\n# Usage\n  \n```\nusage: fp [OPTIONS] [FILES...]\n```\n\n## How to use commandline options\n\nBash's internal function\n[getopts](https://www.gnu.org/savannah-checkouts/gnu/bash/manual/html_node/Bourne-Shell-Builtins.html#index-getopts)\nis used to parse options. (Note: *Not to be confused with the standalone program\n`getopt`, which is a totally different parser and not part of Bash.*)\n\nDue to parser restrictions in Bash, there are only short form of OPTIONS like\n`-h`. Long form such as `--help` are not supported. OPTIONS in general start\nwith a single dash `-` followed by a letter. They are either standalone like\n`-h` or have an additional argument such as `-c DIR`. OPTIONS can be combined\ntoo; in example `-p -t x -c bin` is equivalent to `-ptx -cbin`.\n\nFILES are positional arguments, meaning one or more paths to files and folders.\nThese aren't OPTIONS and therefore don't start with a dash `-`. FILES must be\ngiven after any OPTIONS in the commandline, otherwise the option parser gets\nconfused. Use double dash `--` to stop parsing OPTIONS and indicate that\neverything after the double dash is a file or folder, such as `fp -a -- -*`\n\nIf no FILES is given, then either the content of current working directory or\nthe one set by `-c DIR` is listed. However if any FILES is given, then only\nthose explicitly given files are listed and not their subfolders. Use wildcards\nor set the `-d` option manually to traverse any level of subfolders.\n\nUse `fp -h` to list all options and their brief description.\n\n## Examples\n\n### Default\n\nList all files and folders in current working directory, which don't start with\na dot:\n\n```\n$ fp\n```\n\n### All\n\nList all files and folders, including dot files starting with a \".\" in name:\n\n```\n$ fp -a\n```\n\n### Directories\n\nList only directories. Show a preview box in `fzf` to list content of each\nfolder. Note, the option `-p` only works with `fzf`:\n\n```\n$ fp -p -td\n```\n\n### Vim dotfiles\n\nResolve symlinks to their target and check if the target file exists. List all\nfiles and folders (including dot files) in current working directy which start\nwith \".vim\" .\n\n```\n$ fp -al -- .vim*\n```\n    \n### Rofi\n    \nSearch and list files up to 3 levels deep in folder structure. And use an\nalternate menu system `rofi` instead of `fzf`:\n\n```\n$ fp -d3 -m 'rofi -dmenu' \n```\n\n### Filter\n\nChange current working directory to home directory \"~\". Filter out all files\nwhich do not start with letter \"b\" or \"p\" using [shell\npattern](https://www.gnu.org/software/findutils/manual/html_node/find_html/Shell-Pattern-Matching.html)\nsyntax, similar to how it works in Bash. Only the basename part after last\nslash \"/\" of the path is compared. The filter is case-sensitive at default, but\nin this case option `-i` is set to make it case-insensitive.\n\n```\n$ fp -c ~ -i -f '[bp]*'\n```\n\n### Regex\n\nSimilar to prior example, but with [posix-extended regular\nexpression](https://www.gnu.org/software/findutils/manual/html_node/find_html/posix_002dextended-regular-expression-syntax.html)\ninstead.\n\nA regex filter with `-e PATTERN` compares entire known path with all directory\nparts, not only at basename. However this highly depends on what part of the\npath is known at start time. Any commandline input receiving relative paths\nwill also be seen as incomplete path for the regex filter. That means if\nprogram is invoked like `fp ~/Downloads/*`, then at start time the regex filter\ncan \"see\" entire absolute path and match starting from root \"/\". But if\ncommandline was invoked like `fp Downloads/*`, then the resulting paths are\nrelative and the regex filter cannot match on other parts than it can see.\n\nFor demonstration purposes the next example is composed to mimic the output\nfrom previous example and match on basename part only.\n\n```\n$ fp -c ~ -i -e '.*/[bp][^/]*$'\n```\n\n### Randomizer\n\nThe interactive menu is replaced by a randomizer command. It shuffles around\nall found files and output the complete list. The result is then piped right\ninto `head` to read the first entry.\n\n```\n$ fp -d3 -m 'sort -R' | head -n1\n```\n\n### Stdin\n\nStandard input stream can be read with `-s` . Each newline separated file is\nequivalent to FILES from commandline arguments. In this example we output a\nlist of folders and remove the leading slash \"/\" to make them relative. The\nresult is then piped into `fp` to show a list of existing folders with a\npreview.\n\n```\ncat .gitignore | sed 's+^/++' | fp -sp\n```\n\n### Run programs\n\nOption `-tfx` is short form for `-t f,x` to list regular files with the\nexecutable bit set (such as scripts and applications). The `-r` option\ninstructs to run the selected entry as a command and wait for finish.\n\n```\n$ fp -c ~/bin -tfx -r\n```\n\n### Run anything in background\n\nSimilar to prior example, but here we do not limit the listing. An executable\nfile will be run as a command. Any other filetype, including directories, are\nopened up with it's default associated program detected by `xdg-open`. Instead\n`-r` we use `-b` to run a selection, but in the background without blocking.\n`-o` captures the output and saves it to file.\n\n```\n$ fp -c ~/bin -bo '~/output.txt'\n```\n\nAttention: Be careful to not select multiple files when using a run action.\nOtherwise all selected programs will be executed.\n\n### No Menu\n\nDisable the menu with `-M` or an empty value at `-m ''` (note the space between\n`m` and the quotes `''`). In this mode there won't be an interactive menu to\nselect; each entry is evaluated and output as a newline separated list. This\ncan considerably be slow. Also be very careful when combining this with the run\noptions `-r` or `-b`, as potentially every single entry would be executed then.\n\n```\n$ fp -M *\n```\n\n# Known bugs, quirks, pitfalls, limitations and workarounds\n\n## Findpick issues\n\n* The menu command with `-m` is unprotected at the time of execution. It is not\n  surrounded by quotation marks, meaning if the command includes any spaces it\n  might be broken up and no longer function. Commands such as `fp -m 'grep -e\n  \". .\"'` run at terminal will fail, because the quotes are resolved and\n  suddenlty it's broken in the script. However `fp -m 'grep -e \"..\"'` will\n  work, because there is no space. At this time of writing it is best to avoid\n  spaces that needs quotations to be seen as a single argument.\n\n## Bash issues\n\nNot a bug in **findpick**, but default behaviour or configuration of **Bash**\nitself can cause confusion or unexpected results.\n\n* If you use a wildcard at shell level to give a list of files over, then\n  dotfiles starting with a dot \".\" might not be included. That is not a\n  limitation of the script itself. In example if you run `fp -a`, then the\n  script itself will look into the current working directory and read all files\n  including dotfiles. But if you do `fp -a *`, then you explicitly give a list\n  of files from what Bash sees on the commandline, which excludes dotfiles.\n  Therefore the time the script receives the list, it cannot see dotfiles, even\n  with `-a` option in effect.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthingsiplay%2Ffindpick","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthingsiplay%2Ffindpick","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthingsiplay%2Ffindpick/lists"}