{"id":15209480,"url":"https://github.com/albert26193/fuzzy-shell","last_synced_at":"2025-08-01T06:07:48.723Z","repository":{"id":248292507,"uuid":"827459157","full_name":"Albert26193/fuzzy-shell","owner":"Albert26193","description":"A tool to enchance your shell","archived":false,"fork":false,"pushed_at":"2024-08-18T09:47:51.000Z","size":3152,"stargazers_count":2,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-02T02:01:48.941Z","etag":null,"topics":["bash","fuzzy","fzf-scripts","linux-shell","macos","shell-scripts","zsh"],"latest_commit_sha":null,"homepage":"https://fuzzy.albert.cool/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Albert26193.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2024-07-11T17:25:20.000Z","updated_at":"2024-12-10T09:36:26.000Z","dependencies_parsed_at":"2024-08-18T11:04:11.593Z","dependency_job_id":"2bdbeec6-4da4-4211-8a5f-ad721c4fbde6","html_url":"https://github.com/Albert26193/fuzzy-shell","commit_stats":null,"previous_names":["albert26193/fuzzy-shell"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Albert26193%2Ffuzzy-shell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Albert26193%2Ffuzzy-shell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Albert26193%2Ffuzzy-shell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Albert26193%2Ffuzzy-shell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Albert26193","download_url":"https://codeload.github.com/Albert26193/fuzzy-shell/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238840723,"owners_count":19539602,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","fuzzy","fzf-scripts","linux-shell","macos","shell-scripts","zsh"],"created_at":"2024-09-28T07:40:24.221Z","updated_at":"2025-02-14T12:30:44.125Z","avatar_url":"https://github.com/Albert26193.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fuzzy Shell Documentation\n\n\u003cimg src=\"https://img.shields.io/badge/shell-bash-blue\" alt=\"bash\" style=\"display: inline-block;\" /\u003e\u0026nbsp;\n\u003cimg src=\"https://img.shields.io/badge/shell-zsh-green\" alt=\"zsh\" style=\"display: inline-block;\" /\u003e\u0026nbsp;\n\u003cimg src=\"https://img.shields.io/badge/tool-linux-blue\" alt=\"linux\" style=\"display: inline-block;\" /\u003e\u0026nbsp;\n\u003cimg src=\"https://img.shields.io/badge/tool-mac-green\" alt=\"mac\" style=\"display: inline-block;\" /\u003e\u0026nbsp;\n\n- Doc Site: [fuzzy shell doc site](https://fuzzy.albert.cool/)\n- 中文站点：[fuzzy shell 文档](https://fuzzy.albert.cool/zh/)\n\n\u003e [!TIP]\n\u003e 1. `fuzzy_shell` combines the `fd` and `fzf` tools, making it more user-friendly.\n\u003e 2. `fuzzy_shell` offers fuzzy jumping, editing, and file searching capabilities.\n\n## 1. Installation\n\n### 1.1 Quick Start\n\n```sh\n# clone the repo\ngit clone https://github.com/Albert26193/fuzzy-shell.git\n\n# install on Linux \ncd fuzzy-shell \u0026\u0026 sudo bash install/install.sh\n\n# install on Mac (no sudo)\ncd fuzzy-shell \u0026\u0026 bash install/install.sh\n```\n\n- After installation, if you see the following configuration automatically added to `~/.bashrc` or `~/.zshrc`, the installation is successful 🎉:\n\n```sh\n# ~/.bashrc or ~/.zshrc\n\n#------------------- fuzzy-shell -------------------\nsource \"${HOME}/.fuzzy_shell/scripts/export.sh\"\nalias \"fs\"=\"fuzzy --search\"\nalias \"fj\"=\"fuzzy --jump\"\nalias \"fe\"=\"fuzzy --edit\"\nalias \"fh\"=\"fuzzy --history\"\n```\nRun `source ~/.bashrc` or `source ~/.zshrc` to make the configuration effective.\nType `fj` or `fuzzy --jump` to use the fuzzy jump feature.\n\n### 1.2 Dependencies\n\n- For MacOS users, `brew` needs to be pre-installed.\n- The minimum version requirement for `zsh` is `5.2.0`, and for `bash` is `4.2.0`\n- It's recommended to pre-install `fd` and `fzf` using a package manager. If not pre-installed, you can use the `fd` and `fzf` binary files that come with `fuzzy_shell`\n\n## 2. Usage\nYour shell configuration file (`~/.bashrc` or `~/.zshrc`) has already added aliases for `fuzzy_shell`, which can be used directly.\nEnter `fuzzy --help` to view help information.\n\n```sh\n# fuzzy --help\nUsage: fuzzy [option] [args]\nOptions:\n  -s, --search [keyword1] [keyword2] [keyword3], namely fuzzy search\n  -H, --history                              , namely fuzzy history search\n  -j, --jump [keyword1] [keyword2] [keyword3], namely fuzzy jump\n  -e, --edit [keyword1] [keyword2] [keyword3], namely fuzzy edit\n```\n\u003e [!NOTE]\n\u003e - The following three features, `fuzzy jump`, `fuzzy edit`, and `fuzzy search`, will call the `fd` and `fzf` tools. `fd` is used for file searching, and `fzf` is used for interactive file selection.\n\u003e - The index range, ignore files, etc., can be configured in `~/.fuzzy_shell/config.env`.\n\u003e - Path parameters do not need to match precisely, only fuzzy matching is required.\n\n\n### 2.1 Fuzzy Jump\n\n- `fuzzy jump` is used for fuzzy jumping to a specified directory or the directory containing a specified file.\n\n```sh\n# fuzzy jump to the directory which contains 'keyword1' and 'keyword2', 'keyword3'\nfuzzy --jump keyword1 keyword2 keyword3\n```\n\n### 2.2 fuzzy edit Fuzzy Edit\n\n- `fuzzy edit` is used for fuzzy editing of specified files.\n- The default editor is `vim`, which can be configured in `~/.fuzzy_shell/config.env`, such as `nvim`, etc.\n\n```sh\n# fuzzy edit the file which contains 'keyword1' and 'keyword2', 'keyword3'\nfuzzy --edit keyword1 keyword2 keyword3\n```\n\n### 2.3  Fuzzy Search\n\n- `fuzzy search` is used for fuzzy searching of specified files.\n\n```sh\n# fuzzy search the file which contains 'keyword1' and 'keyword2', 'keyword3'\nfuzzy --search keyword1 keyword2 keyword3\n```\n- Its return result can be passed as an argument to other commands. For example, trying to delete the `some-file` file in the `my-path` directory:\n\n```sh\nrm $(fuzzy --search my-path some-file)\n\n# If you have made an alias in shellrc (~/.zshrc or ~/.bashrc), it can be simplified to\nrm $(fs my-path some-file)\n```\n\n\u003e [!NOTE]\n\u003e - `fuzzy history` will call `fzf` and `history`. `history` is used to retrieve historical records, and `fzf` is used for interactive file selection.\n\n### 2.4 fuzzy history Fuzzy History Search\n\n- `fuzzy history` is used for fuzzy searching of current shell history records.\n- No parameters are needed, just call it directly.\n\n```sh\n# fuzzy search the history\nfuzzy --history\n```\n\n## 3. Configuration\n\n- The configuration file for `fuzzy_shell` is located at `~/.fuzzy_shell/config.env`, where you can configure the search range of `fd`, ignore files, etc.\n- Four parameters can be configured:\n  1. `fs_search_dir`: Search range, i.e., the search path for `fd`.\n  2. `fs_search_ignore_dirs`: Ignore files, i.e., the ignore files for `fd`.\n  3. `fs_preview`: Whether to enable the preview feature, generally recommended to be enabled unless there's severe lag.\n  4. `fs_editor`: Editor, i.e., the editor for `fuzzy edit`.\n\n- The default configuration is as follows:\n\n```sh\n# ~/.fuzzy_shell/config.env\n#!/bin/bash\n\n# in which dir to search\nfs_search_dirs=(\n    \"${HOME}\"\n    #\"CodeSpace\"\n)\n\n# within search range, which dir to ignore\nfs_search_ignore_dirs=(\n    \"Downloads\"\n    \"Desktop\"\n    \"Documents\"\n    \".git\"\n    \".local\"\n    \".m2\"\n    \".gradle\"\n    \".wns\"\n    \".nvm\"\n    \".npm\"\n    \".nrm\"\n    \".red-hat\"\n    \".oh-my-zsh\"\n    \".github\"\n    \".cache\"\n    \".cargo\"\n    \".rustup\"\n    \".vscode\"\n    \".vscode-insiders\"\n    \".vscode-server-insiders\"\n    \".vscode-server\"\n    \".vscode-oss\"\n    \".vscode-oss-insiders\"\n    \"lib\"\n    \"node_modules\"\n    \"pkg\"\n    \"bin\"\n    \"dist\"\n    \"pkgs\"\n    \"from-github\"\n    \"assets\"\n    \"image\"\n    \"images\"\n    \"static\"\n    \"data\"\n    \"raycast\"\n    \"zlt-*\"\n    \"anaconda3\"\n    \"miniconda3\"\n    \"Applications\"\n    \"Library\"\n    \"Movies\"\n    \"Music\"\n    \"Pictures\"\n    \"Public\"\n    \"Remote\"\n    \"Zotero\"\n    \"EVPlayer2_download\"\n)\n\n# search preview or not, true: preview | false: not preview\n# if your machine is not powerful enough(RAM \u003c= 1GiB), set it to false\n# otherwise, set it to true(Recommend)\nfs_search_preview=true\n#fs_search_preview=false\n\nfs_editor=\"vim\"\n# fs_editor=\"nvim\"\n```\n\n## 4. Notes\n\n### 4.1 Uninstallation\n\n- If you no longer need `fuzzy_shell`, you can uninstall it with the following command:\n\n```sh\ncd fuzzy_shell \u0026\u0026 sudo bash install/uninstall.sh\n```\n\n- After uninstallation, the configuration in `~/.bashrc` or `~/.zshrc` needs to be manually cleaned up.\n\n### 4.2 Supported Operating Systems\n\n- Supports `x86_64` architecture `Linux` systems.\n- Supports `x86_64/arm64` architecture `MacOS` systems.\n- Currently tested systems:\n  - `Ubuntu 18.04/22.04`\n  - `CentOS 7/8`\n  - `Debian 10/11/12`\n\n### 4.3 Supported Shells\n\n- Supports `bash` and `zsh`\n- The minimum version requirement for `bash` is `4.2.0`, and for `zsh` is `5.2.0`\n- Currently does not support `fish`, and there are no plans to support `fish` in the future\n\n## 5. Future Plans\n\n- Add fuzzy grep functionality.\n- Add support for `git`, such as fuzzy searching for `reflog/branch/commit`, etc.\n- Add support for `docker`, such as fuzzy searching for docker containers, images, etc.\n\n\n## 6. Acknowledgements\n\n- This project is just a small shell script of a few hundred lines, and the main work should be credited to the support of the `fd` and `fzf` tools.\n- fd project link: [fd](https://github.com/sharkdp/fd)\n- fzf project link: [fzf](https://github.com/junegunn/fzf)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falbert26193%2Ffuzzy-shell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falbert26193%2Ffuzzy-shell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falbert26193%2Ffuzzy-shell/lists"}