├── .editorconfig ├── .gitignore ├── .gitlint ├── .mailmap ├── .pre-commit-config.yaml ├── .shellcheckrc ├── .yamllint.yaml ├── LICENSE ├── README.md ├── bin └── nix-env.jq ├── functions └── main.zsh ├── fzf-tab-source.plugin.zsh ├── pyproject.toml └── sources ├── --complete.zsh ├── --user-expand.zsh ├── -tilde-.zsh ├── 7z.zsh ├── acpi.zsh ├── adb.zsh ├── alacritty-msg.zsh ├── alacritty.zsh ├── antiword.zsh ├── apt-cache-show.zsh ├── ar.zsh ├── archlinux-java.zsh ├── arp.zsh ├── bat.zsh ├── bindkey.zsh ├── brew-cat.zsh ├── brew-info.zsh ├── brew-list.zsh ├── brew.zsh ├── bundle.zsh ├── bunzip2.zsh ├── c++.zsh ├── cabal.zsh ├── cc.zsh ├── chafa.zsh ├── checkmk.zsh ├── chem.zsh ├── chezmoi.zsh ├── clang++.zsh ├── clang.zsh ├── cmake.zsh ├── command.zsh ├── coredumpctl.zsh ├── cowsay.zsh ├── cpp.zsh ├── curl.zsh ├── dbus-send.zsh ├── dconf-dump.zsh ├── dconf-list.zsh ├── dconf.zsh ├── df.zsh ├── docker-container.zsh ├── docker-image.zsh ├── docker-inspect.zsh ├── docker-run.zsh ├── docker.zsh ├── docx2txt.zsh ├── dpkg.zsh ├── du.zsh ├── eqn.zsh ├── ethtool.zsh ├── exiftool.zsh ├── fc-list.zsh ├── findmnt.zsh ├── finger.zsh ├── flatpak.zsh ├── fq.zsh ├── g++.zsh ├── gcc.zsh ├── gcov.zsh ├── gdbus.zsh ├── gdu.zsh ├── gem-check.zsh ├── gem-contents.zsh ├── gem-dependency.zsh ├── gem-environment.zsh ├── gem-help.zsh ├── gem-info.zsh ├── gem-list.zsh ├── gem-pristine.zsh ├── gem-specification.zsh ├── gem-which.zsh ├── getconf.zsh ├── gh.zsh ├── gio.zsh ├── git-blame.zsh ├── git-check-ignore.zsh ├── git-checkout.zsh ├── git-describe.zsh ├── git-diff.zsh ├── git-help.zsh ├── git-log.zsh ├── git-push.zsh ├── git-reflog.zsh ├── git-show.zsh ├── glow.zsh ├── gm.zsh ├── gnome-extensions.zsh ├── go.zsh ├── grn.zsh ├── groff.zsh ├── gsettings-list-children.zsh ├── gsettings-list-keys.zsh ├── gsettings-list-recursively.zsh ├── gsettings.zsh ├── gtk-launch.zsh ├── gunzip.zsh ├── has.zsh ├── help2man.zsh ├── hexdump.zsh ├── hexyl.zsh ├── id.zsh ├── ifnames.zsh ├── ip.zsh ├── journalctl.zsh ├── jq.zsh ├── jupyter.zsh ├── kitty.zsh ├── ldd.zsh ├── libreoffice.zsh ├── limit.zsh ├── lsof.zsh ├── luacheck.zsh ├── luarocks.zsh ├── make.zsh ├── man.zsh ├── mdcat.zsh ├── meson-subprojects.zsh ├── meson-wrap.zsh ├── meson.zsh ├── modinfo.zsh ├── mutt.zsh ├── neocmakelsp-gen-completions.zsh ├── neocmakelsp.zsh ├── neofetch.zsh ├── neqn.zsh ├── netstat.zsh ├── ninja.zsh ├── nix-env.zsh ├── nix-hash.zsh ├── nix-instantiate.zsh ├── nix-store.zsh ├── nix.zsh ├── nm.zsh ├── nmap.zsh ├── nmcli.zsh ├── npm.zsh ├── nroff.zsh ├── nslookup.zsh ├── nvimpager.zsh ├── objdump.zsh ├── od.zsh ├── paclist.zsh ├── pacman-key.zsh ├── pacman.zsh ├── pacsort.zsh ├── pactree.zsh ├── pandoc.zsh ├── pass.zsh ├── perldoc.zsh ├── pic.zsh ├── pip-show.zsh ├── pipx.zsh ├── pkg-config.zsh ├── pkg-info.zsh ├── pkill.zsh ├── plotext.zsh ├── pod2html.zsh ├── pod2latex.zsh ├── pod2man.zsh ├── pod2texi.zsh ├── pod2text.zsh ├── pod2usage.zsh ├── podchecker.zsh ├── poetry.zsh ├── progress.zsh ├── ps.zsh ├── pydoc.zsh ├── pyenv.zsh ├── pygmentize.zsh ├── python.zsh ├── qdbus.zsh ├── rake.zsh ├── read.zsh ├── readelf.zsh ├── readlink.zsh ├── refer.zsh ├── ri.zsh ├── rlwrap.zsh ├── rmmod.zsh ├── ruff-check.zsh ├── ruff-generate-shell-completion.zsh ├── ruff-rule.zsh ├── ruff.zsh ├── run-help.zsh ├── rustup.zsh ├── scp.zsh ├── size.zsh ├── snap.zsh ├── soelim.zsh ├── source-highlight.zsh ├── sqlite3.zsh ├── ss.zsh ├── stat.zsh ├── strings.zsh ├── sudo.zsh ├── svn.zsh ├── sysctl.zsh ├── systemctl-cat.zsh ├── systemctl-help.zsh ├── systemctl-list-dependencies.zsh ├── systemctl-show.zsh ├── systemctl-status.zsh ├── tar.zsh ├── tbl.zsh ├── texdoc.zsh ├── tinymist-completion.zsh ├── tinymist.zsh ├── tmux-show-environment.zsh ├── tmux-show-hook.zsh ├── tmux-show-options.zsh ├── tmux-show-window-options.zsh ├── tmux.zsh ├── toolbox.zsh ├── tput.zsh ├── troff.zsh ├── type.zsh ├── typst.zsh ├── udisksctl-info.zsh ├── ulimit.zsh ├── uname.zsh ├── uncompress.zsh ├── unlz4.zsh ├── unlzma.zsh ├── unzip.zsh ├── unzstd.zsh ├── uv-generate-shell-completion.zsh ├── uv.zsh ├── vared.zsh ├── vimpager.zsh ├── wezterm-command-shell-completion.zsh ├── wezterm-command-start.zsh ├── wezterm.zsh ├── xdg-settings.zsh ├── xxd.zsh ├── yarn.zsh ├── zellij-command-action.zsh ├── zellij.zsh ├── zinit.zsh ├── zipdetails.zsh ├── zmodload.zsh └── zstat.zsh /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [LICENSE] 12 | indent_size = unset 13 | 14 | [Makefile] 15 | indent_style = tab 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Zsh compiled script + zrecompile backup 2 | *.zwc 3 | *.zwc.old 4 | 5 | # Zsh completion-optimization dumpfile 6 | *zcompdump* 7 | 8 | # Zsh zcalc history 9 | .zcalc_history 10 | 11 | # A popular plugin manager's files 12 | ._zinit 13 | .zinit_lastupd 14 | 15 | # zdharma/zshelldoc tool's files 16 | zsdoc/data 17 | 18 | # ohmyzsh/ohmyzsh/plugins/per-directory-history plugin's files 19 | # (when set-up to store the history in the local directory) 20 | .directory_history 21 | 22 | # MichaelAquilina/zsh-autoswitch-virtualenv plugin's files 23 | # (for Zsh plugins using Python) 24 | .venv 25 | 26 | # Zunit tests' output 27 | /tests/_output/* 28 | !/tests/_output/.gitkeep 29 | -------------------------------------------------------------------------------- /.gitlint: -------------------------------------------------------------------------------- 1 | [ignore-by-title] 2 | regex=.* 3 | ignore=body-is-missing 4 | # ex: filetype=dosini 5 | -------------------------------------------------------------------------------- /.mailmap: -------------------------------------------------------------------------------- 1 | Wu Zhenyu Wu, Zhenyu 2 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | repos: 3 | - repo: https://github.com/pre-commit/pre-commit-hooks 4 | rev: v5.0.0 5 | hooks: 6 | - id: check-added-large-files 7 | - id: fix-byte-order-marker 8 | - id: check-case-conflict 9 | - id: check-shebang-scripts-are-executable 10 | - id: check-merge-conflict 11 | - id: trailing-whitespace 12 | - id: mixed-line-ending 13 | - id: end-of-file-fixer 14 | - id: detect-private-key 15 | - id: check-symlinks 16 | - id: check-ast 17 | - id: debug-statements 18 | - id: requirements-txt-fixer 19 | - id: check-xml 20 | - id: check-yaml 21 | - id: check-toml 22 | - id: check-json 23 | - repo: https://github.com/Lucas-C/pre-commit-hooks 24 | rev: v1.5.5 25 | hooks: 26 | - id: remove-crlf 27 | - repo: https://github.com/codespell-project/codespell 28 | rev: v2.3.0 29 | hooks: 30 | - id: codespell 31 | additional_dependencies: 32 | - tomli 33 | - repo: https://github.com/jorisroovers/gitlint 34 | rev: v0.19.1 35 | hooks: 36 | - id: gitlint 37 | args: 38 | - --msg-filename 39 | - repo: https://github.com/editorconfig-checker/editorconfig-checker.python 40 | rev: 3.0.3 41 | hooks: 42 | - id: editorconfig-checker 43 | - repo: https://github.com/jumanjihouse/pre-commit-hooks 44 | rev: 3.0.0 45 | hooks: 46 | - id: check-mailmap 47 | - repo: https://github.com/adrienverge/yamllint 48 | rev: v1.35.1 49 | hooks: 50 | - id: yamllint 51 | - repo: https://github.com/executablebooks/mdformat 52 | rev: 0.7.19 53 | hooks: 54 | - id: mdformat 55 | additional_dependencies: 56 | - mdformat-pyproject 57 | - mdformat-gfm 58 | - mdformat-myst 59 | - mdformat-toc 60 | - mdformat-deflist 61 | - mdformat-beautysh 62 | - mdformat-ruff 63 | - mdformat-config 64 | - mdformat-web 65 | - repo: https://github.com/DavidAnson/markdownlint-cli2 66 | rev: v0.16.0 67 | hooks: 68 | - id: markdownlint-cli2 69 | additional_dependencies: 70 | - markdown-it-texmath 71 | -------------------------------------------------------------------------------- /.shellcheckrc: -------------------------------------------------------------------------------- 1 | disable=all 2 | -------------------------------------------------------------------------------- /.yamllint.yaml: -------------------------------------------------------------------------------- 1 | %YAML 1.2 2 | --- 3 | extends: default 4 | 5 | rules: 6 | comments: 7 | # https://github.com/prettier/prettier/issues/6780 8 | min-spaces-from-content: 1 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # fzf-tab-source 2 | 3 | [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/Freed-Wu/fzf-tab-source/main.svg)](https://results.pre-commit.ci/latest/github/Freed-Wu/fzf-tab-source/main) 4 | 5 | [![github/downloads](https://shields.io/github/downloads/Freed-Wu/fzf-tab-source/total)](https://github.com/Freed-Wu/fzf-tab-source/releases) 6 | [![github/downloads/latest](https://shields.io/github/downloads/Freed-Wu/fzf-tab-source/latest/total)](https://github.com/Freed-Wu/fzf-tab-source/releases/latest) 7 | [![github/issues](https://shields.io/github/issues/Freed-Wu/fzf-tab-source)](https://github.com/Freed-Wu/fzf-tab-source/issues) 8 | [![github/issues-closed](https://shields.io/github/issues-closed/Freed-Wu/fzf-tab-source)](https://github.com/Freed-Wu/fzf-tab-source/issues?q=is%3Aissue+is%3Aclosed) 9 | [![github/issues-pr](https://shields.io/github/issues-pr/Freed-Wu/fzf-tab-source)](https://github.com/Freed-Wu/fzf-tab-source/pulls) 10 | [![github/issues-pr-closed](https://shields.io/github/issues-pr-closed/Freed-Wu/fzf-tab-source)](https://github.com/Freed-Wu/fzf-tab-source/pulls?q=is%3Apr+is%3Aclosed) 11 | [![github/discussions](https://shields.io/github/discussions/Freed-Wu/fzf-tab-source)](https://github.com/Freed-Wu/fzf-tab-source/discussions) 12 | [![github/milestones](https://shields.io/github/milestones/all/Freed-Wu/fzf-tab-source)](https://github.com/Freed-Wu/fzf-tab-source/milestones) 13 | [![github/forks](https://shields.io/github/forks/Freed-Wu/fzf-tab-source)](https://github.com/Freed-Wu/fzf-tab-source/network/members) 14 | [![github/stars](https://shields.io/github/stars/Freed-Wu/fzf-tab-source)](https://github.com/Freed-Wu/fzf-tab-source/stargazers) 15 | [![github/watchers](https://shields.io/github/watchers/Freed-Wu/fzf-tab-source)](https://github.com/Freed-Wu/fzf-tab-source/watchers) 16 | [![github/contributors](https://shields.io/github/contributors/Freed-Wu/fzf-tab-source)](https://github.com/Freed-Wu/fzf-tab-source/graphs/contributors) 17 | [![github/commit-activity](https://shields.io/github/commit-activity/w/Freed-Wu/fzf-tab-source)](https://github.com/Freed-Wu/fzf-tab-source/graphs/commit-activity) 18 | [![github/last-commit](https://shields.io/github/last-commit/Freed-Wu/fzf-tab-source)](https://github.com/Freed-Wu/fzf-tab-source/commits) 19 | [![github/release-date](https://shields.io/github/release-date/Freed-Wu/fzf-tab-source)](https://github.com/Freed-Wu/fzf-tab-source/releases/latest) 20 | 21 | [![github/license](https://shields.io/github/license/Freed-Wu/fzf-tab-source)](https://github.com/Freed-Wu/fzf-tab-source/blob/main/LICENSE) 22 | ![github/languages](https://shields.io/github/languages/count/Freed-Wu/fzf-tab-source) 23 | ![github/languages/top](https://shields.io/github/languages/top/Freed-Wu/fzf-tab-source) 24 | ![github/directory-file-count](https://shields.io/github/directory-file-count/Freed-Wu/fzf-tab-source) 25 | ![github/code-size](https://shields.io/github/languages/code-size/Freed-Wu/fzf-tab-source) 26 | ![github/repo-size](https://shields.io/github/repo-size/Freed-Wu/fzf-tab-source) 27 | ![github/v](https://shields.io/github/v/release/Freed-Wu/fzf-tab-source) 28 | 29 | This zsh plugin is a collection of 30 | [fzf-tab](https://github.com/Aloxaf/fzf-tab)'s sources. Please read 31 | [the wiki](https://github.com/Aloxaf/fzf-tab/wiki/Preview) first. 32 | 33 | ## Install 34 | 35 | This plugin respects 36 | [zsh plugin standard](https://github.com/zdharma-continuum/Zsh-100-Commits-Club/blob/master/Zsh-Plugin-Standard.adoc), 37 | so if you use any plugin manager and follow the instructions of your plugin 38 | manager, it can be installed correctly. 39 | 40 | If you don't use any plugin manager, just add the following code to `~/.zshrc`: 41 | 42 | ```zsh 43 | source /the/directory/of/this/plugin/*.plugin.zsh 44 | ``` 45 | 46 | **NOTE**: Don't source `*.zsh`! They will be sourced by `*.plugin.zsh` automatically. 47 | 48 | ## Preview 49 | 50 | You need some optional tools: 51 | 52 | - [bat](https://github.com/sharkdp/bat): view code 53 | - [pandoc](https://github.com/jgm/pandoc): convert any kind of file to 54 | markdown. Any generated cache file will be store in same 55 | `/tmp/zsh-fzf-tab-$USER` as [fzf-tab](https://github.com/Aloxaf/fzf-tab) 56 | - render markdown: 57 | - [mdcat](https://github.com/swsnr/mdcat): unmaintained 58 | - [mdless](https://github.com/ttscoff/mdless) 59 | - [paper](https://github.com/foxfriends/paper-terminal) 60 | - [glow](https://github.com/charmbracelet/glow) 61 | - [grc](https://github.com/garabik/grc): colorize the output of some commands 62 | - [less](https://github.com/vbwagner/less): a pager 63 | 64 | ### less 65 | 66 | This plugin uses `less` to display any file. `less` can be configured by 67 | the environment variable `LESSOPEN`. 68 | 69 | ```sh 70 | $ echo $LESSOPEN 71 | |/usr/bin/lesspipe %s 72 | ``` 73 | 74 | _NOTE_: in some GNU/Linux distributions, it's `lesspipe.sh` or other names. 75 | 76 | [lesspipe](https://github.com/wofr06/lesspipe) is a script to select 77 | different tool for different kind of file. 78 | You can write your `~/.lessfilter` to 79 | [customize lesspipe](https://github.com/wofr06/lesspipe#9-user-defined-filtering). 80 | For example: 81 | 82 | [lesspipe selects `ls` to display 83 | a directory](https://github.com/wofr06/lesspipe/pull/107). 84 | You can install some tools to view directories, such as: 85 | 86 | - [eza](https://github.com/eza-community/eza): written in rust 87 | - [lsd](https://github.com/lsd-rs/lsd): written in rust 88 | - [colorls](https://github.com/athityakumar/colorls): written in ruby 89 | 90 | ![dir](https://user-images.githubusercontent.com/32936898/195973421-24f28667-3754-46f2-9dd4-42523285aec2.png) 91 | 92 | You can install some tools to view code, such as: 93 | 94 | - [syncat](https://github.com/foxfriends/syncat): use 95 | [tree sitter](https://github.com/tree-sitter/tree-sitter) 96 | - [bat](https://github.com/sharkdp/bat): use 97 | [sublime syntax](https://www.sublimetext.com/docs/syntax.html) 98 | - [pygmentize](https://github.com/pygments/pygments): use python 99 | - [rouge](https://github.com/rouge-ruby/rouge): use ruby 100 | - [vimpager](https://github.com/rkitover/vimpager): use vim script 101 | - [nvimpager](https://github.com/lucc/nvimpager): 102 | [use vim script](https://github.com/lucc/nvimpager/issues/63) 103 | 104 | ![text](https://user-images.githubusercontent.com/32936898/195970444-4220411d-5a11-4b60-a19f-a8839d827711.png) 105 | 106 | [lesspipe doesn't display image](https://github.com/wofr06/lesspipe/pull/106). 107 | You can install some tools to view images, such as: 108 | 109 | - [chafa](https://github.com/hpjansson/chafa): written in C 110 | - [catimg](https://github.com/posva/catimg): written in C 111 | - [timg](https://github.com/hzeller/timg): written in C++ 112 | - [tiv](https://github.com/radare/tiv): written in Vala 113 | - [plotext](https://github.com/piccolomo/plotext): written in python 114 | 115 | ![image](https://user-images.githubusercontent.com/32936898/195970442-1ca8db87-fcb2-469e-8578-163ea73a19ff.png) 116 | 117 | My 118 | [~/.lessfilter](https://github.com/Freed-Wu/my-dotfiles/blob/main/.lessfilter) 119 | can be a reference. 120 | 121 | ### pinyin 122 | 123 | [pinyin-completion](https://github.com/petronny/pinyin-completion): complete 124 | pinyin in your zsh. 125 | 126 | This plugin also uses `less` to view the completion results of pinyin-completion. 127 | 128 | ![user-expand](https://user-images.githubusercontent.com/32936898/195970438-1282c11b-c2e4-455e-8a6a-76c7446ecf8b.png) 129 | 130 | ### zsh 131 | 132 | ![-parameter-](https://user-images.githubusercontent.com/32936898/195970440-98a83556-e664-42e6-9adb-918b865053f3.png) 133 | 134 | This plugin uses any one of the following tools to display user information: 135 | 136 | - `finger` 137 | - `pinky` 138 | 139 | ![-tilde-](https://user-images.githubusercontent.com/32936898/195971353-54ff0bd0-31e7-4bb0-bd88-1107f63a5751.png) 140 | 141 | This plugin also uses `less` to view commands. `lesspipe` uses `ldd` to view 142 | binary programs. 143 | 144 | ![-command-](https://user-images.githubusercontent.com/32936898/195971354-0a9e3228-96d9-4f94-ae58-265ca0709787.png) 145 | 146 | ![bindkey](https://user-images.githubusercontent.com/32936898/195971356-78d0e417-428c-481a-8c96-345d5d73be14.png) 147 | 148 | ### zinit 149 | 150 | [zinit](https://github.com/zdharma-continuum/zinit) is a zsh plugin manager. 151 | Preview every zsh plugin's `README.md`. 152 | 153 | ![zinit](https://user-images.githubusercontent.com/32936898/195971845-006f9b46-0685-4c53-aef8-ab50b0038dfe.png) 154 | 155 | ### hexyl 156 | 157 | Other tools which can display binary files are supported, too: 158 | 159 | - `od` 160 | - `xxd` 161 | 162 | ![hexyl](https://user-images.githubusercontent.com/32936898/195972152-d0130d58-afd4-431c-8e9a-d1777e885257.png) 163 | 164 | ### git 165 | 166 | ![git](https://user-images.githubusercontent.com/32936898/195972427-1abb643e-7a3e-4571-b9c3-e4dd911cf4e5.png) 167 | 168 | This plugin uses your git's pagers to view the outputs of some git command. 169 | 170 | For example, by default: 171 | 172 | ```sh 173 | $ git log --oneline 174 | 3ee9df0 :heavy_plus_sign: Add emojify 175 | d74f60a :sparkles: Add sysctl, lsof, arp, netstat, ss, archlinux-java, coredumpctl 176 | 592d286 :pencil2: Fix a typo about command 177 | 4dd0c69 :children_crossing: Fix #8, don't mkdir ~/.gitmoji 178 | ``` 179 | 180 | You can install [`emojify`](https://github.com/mrowa44/emojify) then: 181 | 182 | ```sh 183 | git config --global pager.log emojify 184 | ``` 185 | 186 | ```sh 187 | $ git log --oneline 188 | 3ee9df0 ➕ Add emojify 189 | d74f60a ✨ Add sysctl, lsof, arp, netstat, ss, archlinux-java, coredumpctl 190 | 592d286 ✏️ Fix a typo about command 191 | 4dd0c69 🚸 Fix #8, don't mkdir ~/.gitmoji 192 | ``` 193 | 194 | ![git log](https://github.com/Freed-Wu/fzf-tab-source/assets/32936898/5f73c9ce-6025-463d-a2f2-2239baee7179) 195 | 196 | My 197 | [~/.config/git/config](https://github.com/Freed-Wu/my-dotfiles/blob/main/.config/git/config) 198 | can be a reference. 199 | 200 | ### kill 201 | 202 | Preview which command will be killed after `kill XXX`. 203 | 204 | ![kill](https://user-images.githubusercontent.com/32936898/195972969-437326bb-4514-4c46-8a55-fe16808a0368.png) 205 | 206 | ### make 207 | 208 | Preview which command will be executed after `make XXX`. 209 | 210 | ![make](https://user-images.githubusercontent.com/32936898/195984087-c802d78f-00ae-4139-904c-74fb668cb844.png) 211 | 212 | ### systemctl 213 | 214 | ![systemctl](https://user-images.githubusercontent.com/32936898/195973059-ab426a65-2e04-4e5a-8474-d201a6644adb.png) 215 | 216 | ### adb 217 | 218 | We cannot ensure any program (`eza`, etc) are installed in other machine 219 | (Android). This plugin uses Android's `ls` to display directory and `cat` to 220 | display text. 221 | 222 | ![adb](https://user-images.githubusercontent.com/32936898/203727602-e33b617d-a218-435e-8f8a-585e7679857f.jpg) 223 | 224 | ## Customize 225 | 226 | ### Sources 227 | 228 | ```zsh 229 | zstyle ':fzf-tab:sources' config-directory /a/directory 230 | ``` 231 | 232 | You can use your customized fzf-tab sources to override 233 | [this plugin's sources](sources). 234 | `*.zsh` in `config-directory` are standalone zsh scripts which can be syntax 235 | highlighted by your editor: 236 | 237 | ```zsh 238 | # :fzf-tab:complete:context --optional-fzf-option 239 | foobar $word 240 | ``` 241 | 242 | - Built-in commands and aliases should start with `(\\|)` to support `\command` 243 | - Commands should start with `(\\|*/|)` to support `=command` 244 | 245 | That is, `\command `, `=command ` will get same preview windows as 246 | `command `. 247 | 248 | ### Similar Project 249 | 250 | - [fifc](https://github.com/gazorby/fifc): 251 | [fzf](https://github.com/junegunn/fzf) for 252 | [fish](https://github.com/fish-shell/fish-shell) 253 | -------------------------------------------------------------------------------- /bin/nix-env.jq: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env -S jq -rf 2 | .[] as $root | $root.meta | "# \(.name) 3 | <\(.homepage)> *\(.license.spdxId)* 4 | \(.description) 5 | 6 | \(.longDescription) 7 | \($root.outputs.out) 8 | \(.position)" 9 | -------------------------------------------------------------------------------- /functions/main.zsh: -------------------------------------------------------------------------------- 1 | # define some functions to avoid any error that these programs don't exist 2 | # treat bat -lXXX as cat 3 | # currently, only bat supports highlight --help 4 | alias -g -- "--help=\\--help | bat -lhelp" 5 | 6 | if (($+commands[bat])); then 7 | bat() {command bat --color=always -p $@} 8 | elif (($+commands[batcat])); then 9 | bat() {command batcat --color=always -p $@} 10 | else 11 | bat() {command cat} 12 | fi 13 | 14 | if ((! $+commands[mdcat])); then 15 | if (($+commands[paper])); then 16 | mdcat() {command paper $@} 17 | elif (($+commands[mdless])); then 18 | mdcat() {command mdless $@} 19 | elif (($+commands[glow])); then 20 | mdcat() {command glow $@} 21 | else 22 | # use bat() as fallback 23 | mdcat() {bat -lmarkdown} 24 | fi 25 | fi 26 | 27 | if ((! $+commands[finger])); then 28 | (($+commands[pinky])) && finger() {command pinky $@} || 29 | finger() {command whoami} 30 | fi 31 | 32 | (($+commands[pandoc])) || pandoc() {command cat ${@[-1]}} 33 | (($+commands[grc])) || grc() {eval ${@[2,-1]}} 34 | 35 | # https://github.com/Freed-Wu/fzf-tab-source/issues/6 36 | if (($+commands[less])) && [ -x ~/.lessfilter ]; then 37 | less() {~/.lessfilter $@ || command less $@} 38 | else 39 | (($+commands[less])) || less() {command ls -l $@} 40 | fi 41 | 42 | # use pager to process the output of git 43 | (($+commands[git])) && git() { 44 | command git $@ | eval $(command git config pager.$1 || command git config core.pager || echo cat) 45 | } 46 | 47 | tmp_dir=${TMPPREFIX:-/tmp/zsh}-fzf-tab-$USER 48 | 49 | # https://bixense.com/clicolors/ 50 | export CLICOLOR_FORCE=1 51 | export SYSTEMD_COLORS=1 52 | 53 | . $src 54 | -------------------------------------------------------------------------------- /fzf-tab-source.plugin.zsh: -------------------------------------------------------------------------------- 1 | # https://github.com/zdharma-continuum/Zsh-100-Commits-Club/blob/master/Zsh-Plugin-Standard.adoc 2 | 0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}" 3 | 0="${${(M)0:#/*}:-$PWD/$0}" 4 | 5 | function () { 6 | local dir=${1:h} config_directory 7 | local sources=($dir/sources/*.zsh) 8 | # use user's sources to override this plugin's sources 9 | zstyle -s ':fzf-tab:sources' config-directory config_directory && 10 | sources+=($config_directory/**/*.zsh(.N)) 11 | 12 | # https://github.com/Freed-Wu/fzf-tab-source/issues/11 13 | # enable $group 14 | zstyle ':completion:*:descriptions' format %d 15 | 16 | local src line arr ctx flags 17 | for src in $sources; do 18 | while read -r line; do 19 | # strip code to get magic comment 20 | arr=(${(@s. .)line##\# }) 21 | ctx=${arr[1]} 22 | if [[ $ctx == ':fzf-tab:'* ]]; then 23 | break 24 | fi 25 | done < $src 26 | zstyle $ctx fzf-preview "src="\""$src"\"" . "\""$dir"\""/functions/main.zsh" 27 | flags=${arr[2]} 28 | # https://github.com/Aloxaf/fzf-tab/issues/282 29 | # https://github.com/junegunn/fzf/issues/2822 30 | # $word = {2} make a wrong --preview-window=+{2} 31 | zstyle $ctx fzf-flags ${flags:---preview-window=+0} 32 | done 33 | } $0 34 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.mdformat] 2 | number = true 3 | 4 | [tool.codespell] 5 | ignore-words-list = "rouge" 6 | -------------------------------------------------------------------------------- /sources/--complete.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:* 2 | # `${realpath#--*=}` aims to handle `--long-option=/the/path/of/a/file` 3 | less ${realpath#-*=} 4 | -------------------------------------------------------------------------------- /sources/--user-expand.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:user-expand:: 2 | case $group in 3 | expansions) 4 | less $word 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/-tilde-.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:-tilde-: 2 | case $group in 3 | user) 4 | finger $word 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/7z.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)7z: 2 | [[ -f $realpath ]] && 7z l $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/acpi.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)acpi:options 2 | case $group in 3 | directory) 4 | acpi -d $wod 5 | ;; 6 | option) 7 | case $word in 8 | -(k|f|-(kelvin|fahrenheit))) 9 | acpi -t $word 10 | ;; 11 | *) 12 | acpi $word 13 | ;; 14 | esac 15 | esac 16 | -------------------------------------------------------------------------------- /sources/adb.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)adb-(push|pull|shell):argument-rest 2 | case $group in 3 | 'file/folder on device') 4 | # https://github.com/Aloxaf/fzf-tab/issues/325 5 | adb shell 'type=$(file -L '"$ctxt[hpre]$word"' | cut -d: -f2) && test -z "${type/ASCII text/}" && cat '"$ctxt[hpre]$word"' || ls -l --color '$ctxt[hpre]$word 6 | ;; 7 | 'local file/folder') 8 | less $realpath 9 | ;; 10 | esac 11 | -------------------------------------------------------------------------------- /sources/alacritty-msg.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)alacritty-command-msg:argument-1 2 | case $group in 3 | 'alacritty msg commands') 4 | alacritty msg help $word | bat -lhelp 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/alacritty.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)alacritty:argument-1 2 | case $group in 3 | 'alacritty commands') 4 | alacritty help $word | bat -lhelp 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/antiword.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)antiword:argument-rest 2 | [[ -f $realpath ]] && antiword $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/apt-cache-show.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)apt(|-cache):argument-rest 2 | apt-cache show $word | bat -lyaml 3 | -------------------------------------------------------------------------------- /sources/ar.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)ar: 2 | ar tv $word 3 | -------------------------------------------------------------------------------- /sources/archlinux-java.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)archlinux-java:argument-1 2 | case $word in 3 | (get|status)) 4 | archlinux-java $word 5 | ;; 6 | help) 7 | archlinux-java $word | bat -plhelp 8 | ;; 9 | esac 10 | -------------------------------------------------------------------------------- /sources/arp.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)arp:argument-1 2 | case $group in 3 | host) 4 | arp $word 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/bat.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)bat(|cat):argument-rest 2 | case $group in 3 | subcommand) 4 | bat cache --help 5 | ;; 6 | *) 7 | [[ -f ${realpath#--*=} ]] && bat ${realpath#--*=} || less ${realpath#--*=} 8 | ;; 9 | esac 10 | -------------------------------------------------------------------------------- /sources/bindkey.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|)bindkey:option-M-1 2 | case $group in 3 | keymap) 4 | bindkey -M$word | bat -ltsv 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/brew-cat.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:brew-(edit|cat|test):(|installed_)(cask|formula|tap)-argument-rest 2 | brew cat $word | bat -lruby 3 | -------------------------------------------------------------------------------- /sources/brew-info.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:brew-((|un)install|info|cleanup):(|installed_)(cask|formula|tap)-argument-rest 2 | brew info $word | bat -lyaml 3 | -------------------------------------------------------------------------------- /sources/brew-list.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:brew-(list|ls):(|installed_)(cask|formula|tap)-argument-rest 2 | brew list $word 3 | -------------------------------------------------------------------------------- /sources/brew.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)brew:argument-1 2 | brew $word --help 3 | -------------------------------------------------------------------------------- /sources/bundle.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)bundle:values 2 | bundle help $word | bat -lhelp 3 | -------------------------------------------------------------------------------- /sources/bunzip2.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)bunzip2:argument-rest 2 | [[ -f $realpath ]] && bunzip2 -c $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/c++.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|):c++:argument-rest 2 | c++ -o- -S $realpath | bat -lasm 3 | -------------------------------------------------------------------------------- /sources/cabal.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)cabal:argument-1 2 | cabal help $word | bat -lhelp 3 | -------------------------------------------------------------------------------- /sources/cc.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|):cc:argument-rest 2 | cc -o- -S $realpath | bat -lasm 3 | -------------------------------------------------------------------------------- /sources/chafa.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)chafa: 2 | [[ -f $realpath ]] && chafa -f symbols $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/checkmk.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)checkmk: 2 | [[ -f $realpath ]] && checkmk $realpath | bat -lc || 3 | less $realpath 4 | -------------------------------------------------------------------------------- /sources/chem.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)chem: 2 | [[ -f $realpath ]] && chem $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/chezmoi.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)chezmoi: 2 | chezmoi $word --help 3 | -------------------------------------------------------------------------------- /sources/clang++.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|):clang++:argument-rest 2 | clang++ -o- -S $realpath | bat -lasm 3 | -------------------------------------------------------------------------------- /sources/clang.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|):clang:argument-rest 2 | clang -o- -S $realpath | bat -lasm 3 | -------------------------------------------------------------------------------- /sources/cmake.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)(c(make|test|pack)|ccmake|cmake-gui):options 2 | [[ $word == --help* ]] && cmake $word 3 | -------------------------------------------------------------------------------- /sources/command.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(-command-:|command:option-(v|V)-rest) 2 | case $group in 3 | 'external command') 4 | less =$word 5 | ;; 6 | 'executable file') 7 | less ${realpath#--*=} 8 | ;; 9 | 'builtin command') 10 | run-help $word | bat -lman 11 | ;; 12 | parameter) 13 | echo ${(P)word} 14 | ;; 15 | esac 16 | -------------------------------------------------------------------------------- /sources/coredumpctl.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)coredumpctl:argument-rest 2 | case $group in 3 | coredumps) 4 | coredumpctl info $word | bat -lyaml 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/cowsay.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)cowsay: 2 | case $group in 3 | 'cow file') 4 | cowsay -f $word hello 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/cpp.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)cpp:argument-rest 2 | cpp $realpath 3 | -------------------------------------------------------------------------------- /sources/curl.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)curl:argument-rest 2 | curl -I $word 2>/dev/null | bat -lyaml 3 | -------------------------------------------------------------------------------- /sources/dbus-send.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)dbus-send:* 2 | case $group in 3 | connection) 4 | dbus-send --print-reply=literal --dest=$word / org.freedesktop.DBus.Introspectable.Introspect | 5 | bat -plxml 6 | ;; 7 | esac 8 | -------------------------------------------------------------------------------- /sources/dconf-dump.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)dconf-dump: 2 | case $group in 3 | directory) 4 | # https://github.com/Aloxaf/fzf-tab/issues/325 5 | # no real toml 6 | dconf dump $ctxt[hpre]$word | bat -ltoml 7 | ;; 8 | esac 9 | -------------------------------------------------------------------------------- /sources/dconf-list.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)dconf-list: 2 | case $group in 3 | directory) 4 | # https://github.com/Aloxaf/fzf-tab/issues/325 5 | dconf list $ctxt[hpre]$word 6 | ;; 7 | esac 8 | -------------------------------------------------------------------------------- /sources/dconf.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)dconf(|-help): 2 | case $group in 3 | command) 4 | dconf help $word | bat -lhelp 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/df.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)df:argument-rest 2 | [[ $group != 'device label' ]] && grc --colour=on df -Th $word 3 | -------------------------------------------------------------------------------- /sources/docker-container.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:docker-container:argument-1 2 | docker container $word --help 3 | -------------------------------------------------------------------------------- /sources/docker-image.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:docker-image:argument-1 2 | docker image $word --help 3 | -------------------------------------------------------------------------------- /sources/docker-inspect.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:docker-inspect: 2 | docker inspect $word | bat -ljson 3 | -------------------------------------------------------------------------------- /sources/docker-run.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:docker-(run|images):argument-1 2 | docker images $word 3 | -------------------------------------------------------------------------------- /sources/docker.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:((\\|*/|)docker|docker-help):argument-1 2 | docker help $word | bat -lhelp 3 | -------------------------------------------------------------------------------- /sources/docx2txt.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)docx2txt: 2 | [[ -f $realpath ]] && docx2txt $realpath - || less $realpath 3 | -------------------------------------------------------------------------------- /sources/dpkg.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)dpkg:argument-rest 2 | case $group in 3 | file) 4 | dpkg -S $word 5 | ;; 6 | package) 7 | dpkg -L $word 8 | ;; 9 | esac 10 | -------------------------------------------------------------------------------- /sources/du.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)du:argument-rest 2 | grc --colour=on du -sh $realpath 3 | -------------------------------------------------------------------------------- /sources/eqn.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)eqn: 2 | [[ -f $realpath ]] && eqn $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/ethtool.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)ethtool:argument-1 2 | case $group in 3 | interface) 4 | ethtool $word 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/exiftool.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)exiftool: 2 | exiftool $realpath | bat -lyaml 3 | -------------------------------------------------------------------------------- /sources/fc-list.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)fc-list: 2 | fc-list $word 3 | -------------------------------------------------------------------------------- /sources/findmnt.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)findmnt:argument-1 2 | [[ $group != prefix ]] && grc --colour=on findmnt $word 3 | -------------------------------------------------------------------------------- /sources/finger.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)finger:argument-rest 2 | [[ $group == user ]] && finger $word 3 | -------------------------------------------------------------------------------- /sources/flatpak.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)flatpak: 2 | case $group in 3 | argument) 4 | flatpak $word --help 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/fq.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)fq: 2 | [[ -f $realpath ]] && fq -Cr . $realpath 2>/dev/null || less $realpath 3 | -------------------------------------------------------------------------------- /sources/g++.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|):g++:argument-rest 2 | g++ -o- -S $realpath | bat -lasm 3 | -------------------------------------------------------------------------------- /sources/gcc.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)gcc:* 2 | case $group in 3 | 'input file') 4 | gcc -o- -S $realpath | bat -lasm 5 | ;; 6 | help) 7 | gcc --help=$word | bat -lhelp 8 | ;; 9 | esac 10 | -------------------------------------------------------------------------------- /sources/gcov.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)gcov: 2 | [[ -f $realpath ]] && gcov $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/gdbus.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)gdbus: 2 | # FIXME: strip trailing whitespaces 3 | word=${word%% } 4 | [[ $word != -* ]] && gdbus $word --help 5 | -------------------------------------------------------------------------------- /sources/gdu.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)gdu:argument-rest 2 | [ -d $realpath ] && gdu -n $realpath || grc --colour=on du -sh $realpath 3 | -------------------------------------------------------------------------------- /sources/gem-check.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:gem-check:argument-rest 2 | gem check $word 3 | -------------------------------------------------------------------------------- /sources/gem-contents.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:gem-contents:argument-rest 2 | gem contents $word 3 | -------------------------------------------------------------------------------- /sources/gem-dependency.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:gem-dependency:argument-rest 2 | gem dependency $word 3 | -------------------------------------------------------------------------------- /sources/gem-environment.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:gem-environment:argument-1 2 | gem environment $word 3 | -------------------------------------------------------------------------------- /sources/gem-help.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:((\\|*/|)gem:argument-rest|gem-help:) 2 | gem help $word | bat -lhelp 3 | -------------------------------------------------------------------------------- /sources/gem-info.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:gem-((|un)install|update|lock|fetch|open|yank|owner|unpack):argument-rest 2 | gem info $word | bat -lyaml 3 | -------------------------------------------------------------------------------- /sources/gem-list.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:gem-list:argument-rest 2 | gem list $word 3 | -------------------------------------------------------------------------------- /sources/gem-pristine.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:gem-pristine:argument-rest 2 | gem pristine $word 3 | -------------------------------------------------------------------------------- /sources/gem-specification.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:gem-specification:argument-1 2 | gem specification $word | bat -lyaml 3 | -------------------------------------------------------------------------------- /sources/gem-which.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:gem-which:argument-rest 2 | gem which $word 3 | -------------------------------------------------------------------------------- /sources/getconf.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)getconf: 2 | getconf $word 3 | -------------------------------------------------------------------------------- /sources/gh.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:gh: 2 | gh help $word | bat -lhelp 3 | -------------------------------------------------------------------------------- /sources/gio.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)gio: 2 | [[ -f $realpath ]] && less $realpath || 3 | gio help $word 2>&1 | bat -lhelp 4 | -------------------------------------------------------------------------------- /sources/git-blame.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:git-blame:argument-2 2 | case $group in 3 | 'cached file') 4 | [[ -f $realpath ]] && git blame $realpath || less $realpath 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/git-check-ignore.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:git-check-ignore:argument-rest 2 | git check-ignore $realpath 3 | -------------------------------------------------------------------------------- /sources/git-checkout.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:git-checkout:argument-rest 2 | case $group in 3 | 'modified file') 4 | git diff $realpath 5 | ;; 6 | 'recent commit object name') 7 | git diff --color=always $word 8 | ;; 9 | *) 10 | git log --color=always $realpath 11 | ;; 12 | esac 13 | -------------------------------------------------------------------------------- /sources/git-describe.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:git-describe:argument-rest 2 | git describe $word 3 | -------------------------------------------------------------------------------- /sources/git-diff.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:git-(diff|cherry-pick):argument-rest 2 | case $group in 3 | 'tree file') 4 | less ${realpath#--*=} 5 | ;; 6 | *) 7 | git diff $realpath 8 | ;; 9 | esac 10 | -------------------------------------------------------------------------------- /sources/git-help.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:((\\|*/|)git|git-help):argument-1 2 | git help $word | bat -lhelp 3 | -------------------------------------------------------------------------------- /sources/git-log.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:git-log:argument-1 2 | git log --color=always $realpath 3 | -------------------------------------------------------------------------------- /sources/git-push.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:git-((push|pull):argument-1|fetch:argument-rest) 2 | case $group in 3 | 'local repository') 4 | less ${realpath#--*=} 5 | ;; 6 | remote) 7 | git remote show $word 8 | ;; 9 | *host*) 10 | grc --colour=on ping -c1 $word 11 | ;; 12 | esac 13 | -------------------------------------------------------------------------------- /sources/git-reflog.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:git-reflog(|-*):argument-1 2 | case $group in 3 | command) 4 | git reflog --color=always 5 | ;; 6 | reference) 7 | git reflog --color=always $word 8 | ;; 9 | esac 10 | -------------------------------------------------------------------------------- /sources/git-show.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:git-show:argument-rest 2 | case $group in 3 | 'cached file') 4 | less $realpath 5 | ;; 6 | *) 7 | git show --color=always $word 8 | ;; 9 | esac 10 | -------------------------------------------------------------------------------- /sources/glow.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)glow:argument-rest 2 | [[ -f $realpath ]] && glow $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/gm.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)gm: 2 | gm $word -help | bat -lhelp 3 | -------------------------------------------------------------------------------- /sources/gnome-extensions.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)gnome-extensions: 2 | if [[ $word == *@* ]]; then 3 | gnome-extensions show $word | bat -lyaml 4 | else 5 | gnome-extensions help $word 2>&1 | bat -lhelp 6 | fi 7 | -------------------------------------------------------------------------------- /sources/go.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)go:argument-1 2 | go help $word | bat -lhelp 3 | -------------------------------------------------------------------------------- /sources/grn.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)grn: 2 | [[ -f $realpath ]] && grn $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/groff.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)groff:argument-1 2 | [[ -f $realpath ]] && groff $realpath -T html &>/dev/null | pandoc -tmarkdown -o- | mdcat || 3 | less $realpath 4 | -------------------------------------------------------------------------------- /sources/gsettings-list-children.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)gsettings-list-children: 2 | case $group in 3 | schema) 4 | gsettings list-children $word 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/gsettings-list-keys.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)gsettings-list-keys: 2 | case $group in 3 | schema) 4 | gsettings list-keys $word 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/gsettings-list-recursively.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)gsettings-list-recursively: 2 | case $group in 3 | schema) 4 | gsettings list-recursively $word 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/gsettings.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)gsettings(|-help): 2 | case $group in 3 | command) 4 | gsettings help $word | bat -lhelp 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/gtk-launch.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)gtk-launch:values 2 | less {/usr,~/.local,~/.local/state/nix/profile,/run/current-system/sw}/share/applications/$word.desktop(N) 3 | -------------------------------------------------------------------------------- /sources/gunzip.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)gunzip:argument-rest 2 | [[ -f $realpath ]] && gunzip -c $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/has.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)has:argument-rest 2 | case $group in 3 | 'external command') 4 | has $word 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/help2man.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)help2man: 2 | [[ -f $realpath ]] && 3 | help2man $realpath | man --local-file - | bat -lman || 4 | less $realpath 5 | -------------------------------------------------------------------------------- /sources/hexdump.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)hexdump:argument-rest 2 | [[ $group == file && -f $realpath ]] && hexdump $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/hexyl.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)hexyl: 2 | [[ $group == file && -f $realpath ]] && hexyl $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/id.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)id:options 2 | case $word in 3 | --*) 4 | id -n $word 5 | ;; 6 | -*) 7 | id $word 8 | ;; 9 | esac 10 | -------------------------------------------------------------------------------- /sources/ifnames.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)ifnames: 2 | [[ -f $realpath ]] && ifnames $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/ip.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)ip: 2 | case $group in 3 | 'ip command') 4 | grc --colour=on ip $word 5 | ;; 6 | *' command') 7 | ip ${group%% *} help 2>&1 | bat -lhelp 8 | ;; 9 | esac 10 | -------------------------------------------------------------------------------- /sources/journalctl.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)journalctl:* 2 | case $group in 3 | 'boot '*) 4 | journalctl -b $word | bat -llog 5 | ;; 6 | '/dev files') 7 | journalctl -b /dev/$word | bat -llog 8 | ;; 9 | commands) 10 | journalctl $word | bat -llog 11 | ;; 12 | 'possible values') 13 | journalctl -u $word | bat -llog 14 | ;; 15 | esac 16 | -------------------------------------------------------------------------------- /sources/jq.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)jq:argument-rest 2 | [[ -f $realpath ]] && jq -Cr . $realpath 2>/dev/null || less $realpath 3 | -------------------------------------------------------------------------------- /sources/jupyter.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)jupyter:argument-1 2 | jupyter $word --help 3 | -------------------------------------------------------------------------------- /sources/kitty.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)kitty: 2 | case $group in 3 | 'external command') 4 | less =$word 5 | ;; 6 | '%BEntry points%b') 7 | kitty $word --help 8 | ;; 9 | esac 10 | -------------------------------------------------------------------------------- /sources/ldd.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)ldd:argument-rest 2 | [[ -f $realpath ]] && ldd $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/libreoffice.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)(libre|s)office: 2 | if [[ -f $realpath && ${realpath:e} == xls* ]]; then 3 | libreoffice --headless --convert-to html --outdir $tmp_dir $realpath &>/dev/null && 4 | pandoc -tmarkdown -o- $tmp_dir/${realpath:t:r}.html | bat -lmarkdown 5 | rm $tmp_dir/${realpath:t:r}.html 6 | elif [[ -f $realpath ]]; then 7 | libreoffice --headless --cat $realpath 8 | else 9 | less $realpath 10 | fi 11 | -------------------------------------------------------------------------------- /sources/limit.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|)limit: 2 | limit $word 3 | -------------------------------------------------------------------------------- /sources/lsof.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)lsof:option-i-1 2 | case $group in 3 | port) 4 | lsof -i :$word 5 | ;; 6 | *) 7 | lsof -i $word 8 | ;; 9 | esac 10 | -------------------------------------------------------------------------------- /sources/luacheck.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)luacheck: 2 | luacheck --codes $word 3 | -------------------------------------------------------------------------------- /sources/luarocks.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)luarocks:argument-1 2 | luarocks help $word | bat -lhelp 3 | -------------------------------------------------------------------------------- /sources/make.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)(g|b|d|p|freebsd-|)make: 2 | case $group in 3 | 'make target') 4 | make -n $word | bat -lsh 5 | ;; 6 | 'make variable') 7 | make -pq | rg -Ns "^$word = " | bat -lsh 8 | ;; 9 | file) 10 | less ${realpath#--*=} 11 | ;; 12 | esac 13 | -------------------------------------------------------------------------------- /sources/man.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)man: 2 | [[ $group == 'manual page' ]] && man $word | bat -lman 3 | -------------------------------------------------------------------------------- /sources/mdcat.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)md(cat|less):argument-rest 2 | [[ -f $realpath ]] && mdcat $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/meson-subprojects.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)meson-subprojects: 2 | meson subprojects $word --help 3 | -------------------------------------------------------------------------------- /sources/meson-wrap.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)meson-wrap: 2 | meson wrap $word --help 3 | -------------------------------------------------------------------------------- /sources/meson.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)meson:argument-1 2 | meson $word --help 3 | -------------------------------------------------------------------------------- /sources/modinfo.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)modinfo:argument-1 2 | case $group in 3 | 'module file') 4 | [[ -f $realpath ]] && modinfo $realpath | bat -lyaml || less $realpath 5 | ;; 6 | module(|' alias')) 7 | modinfo $word | bat -lyaml 8 | ;; 9 | esac 10 | -------------------------------------------------------------------------------- /sources/mutt.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)(|neo)mutt:(argument-1|option-(b|c)-1) 2 | case $group in 3 | 'file attachment') 4 | less ${realpath#--*=} 5 | ;; 6 | *' recipient') 7 | finger $word 8 | ;; 9 | esac 10 | -------------------------------------------------------------------------------- /sources/neocmakelsp-gen-completions.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)neocmakelsp-command-gen-completion:argument-1 2 | case $group in 3 | shell) 4 | neocmakelsp gen-completion $word | bat -pl$word 2>/dev/null || 5 | neocmakelsp gen-completion $word 6 | ;; 7 | esac 8 | -------------------------------------------------------------------------------- /sources/neocmakelsp.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)neocmakelsp(|neocmakelsp-command-help):argument-1 2 | case $group in 3 | 'neocmakelsp '(help |)'commands') 4 | neocmakelsp help $word | bat -plhelp 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/neofetch.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)neofetch:argument-rest 2 | neofetch $word | bat -lyaml 3 | -------------------------------------------------------------------------------- /sources/neqn.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)neqn: 2 | [[ -f $realpath ]] && neqn $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/netstat.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)netstat:options 2 | case $group in 3 | option) 4 | [[ $word == -(h|-help) ]] && 5 | netstat $word | bat -lhelp || 6 | grc --colour=on netstat $word 7 | ;; 8 | esac 9 | -------------------------------------------------------------------------------- /sources/ninja.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)ninja:argument-rest 2 | case $group in 3 | targets) 4 | ninja -vn $word 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/nix-env.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)nix-env:* 2 | (($+commands[jq])) && view_json() { 3 | ${src:h:h}/bin/nix-env.jq | mdcat 4 | } || view_json() { 5 | bat -ljson 6 | } 7 | 8 | case $group in 9 | 'Attribute path') 10 | nix-env -qa --out-path --json --meta -A $ctxt[hpre]$word | view_json 11 | ;; 12 | 'Installed package'*) 13 | nix-env -q --out-path --json --meta $word | view_json 14 | ;; 15 | 'Store path to package') 16 | less $realpath 17 | ;; 18 | esac 19 | -------------------------------------------------------------------------------- /sources/nix-hash.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)nix-hash:argument-rest 2 | nix-hash $realpath 3 | -------------------------------------------------------------------------------- /sources/nix-instantiate.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)nix-instantiate:* 2 | case $group in 3 | (shortcuts|'Local file')) 4 | nix-instantiate --eval $word | bat -lnix 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/nix-store.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)nix-store:* 2 | case $group in 3 | 'Store Paths') 4 | nix-store -q --tree $realpath 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/nix.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)nix: 2 | nix help $word | bat -lhelp 3 | -------------------------------------------------------------------------------- /sources/nm.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)nm:argument-rest 2 | nm --demangle $realpath 3 | -------------------------------------------------------------------------------- /sources/nmap.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)nmap:argument-rest 2 | nmap $word 3 | -------------------------------------------------------------------------------- /sources/nmcli.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)nmcli:argument-1 2 | case $group in 3 | command) 4 | nmcli $word help 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/npm.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)npm: 2 | npm help -l $word | bat -lmarkdown 3 | -------------------------------------------------------------------------------- /sources/nroff.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)nroff: 2 | [[ -f $realpath ]] && nroff $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/nslookup.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)nslookup:argument-1 2 | case $group in 3 | 'host to find') 4 | nslookup $word | bat -lyaml 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/nvimpager.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)nvimpager:* 2 | case $group in 3 | file) 4 | [[ -f $realpath ]] && nvimpager -c $realpath || less $realpath 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/objdump.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)objdump:argument-rest 2 | objdump -dhl --disassembler-color=extended-color --visualize-jumps=extended-color $realpath 3 | -------------------------------------------------------------------------------- /sources/od.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)od:argument-rest 2 | [[ $group == file && -f $realpath ]] && od -Ax -tx1 $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/paclist.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)paclist:values 2 | case $group in 3 | repository) 4 | paclist $word 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/pacman-key.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)pacman-key: 2 | case $group in 3 | 'keys in keyring') 4 | pacman-key -f $word;; 5 | esac 6 | -------------------------------------------------------------------------------- /sources/pacman.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)(pacman|paru|yay):(argument-(rest|1)|option-l-1) 2 | case $group in 3 | 'package file') 4 | less $realpath 5 | ;; 6 | (('installed '|)package|'local packages')) 7 | pacman -Qi $word | bat -lyaml 8 | ;; 9 | packages) 10 | if (($+commands[paru])); then 11 | paru -Si $word | bat -lyaml 12 | elif (($+commands[yay])); then 13 | yay -Si $word | bat -lyaml 14 | else 15 | pacman -Si $word | bat -lyaml 16 | fi 17 | ;; 18 | esac 19 | -------------------------------------------------------------------------------- /sources/pacsort.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)pacsort:argument-rest 2 | [[ -f $realpath ]] && pacsort $realpath | bat -lbash || less $realpath 3 | -------------------------------------------------------------------------------- /sources/pactree.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)pactree:values 2 | case $group in 3 | package) 4 | pactree $word 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/pandoc.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)pandoc:argument-rest 2 | [[ $group == file && -f $realpath ]] && 3 | pandoc -tmarkdown $realpath | bat -lmarkdown || 4 | less $realpath 5 | -------------------------------------------------------------------------------- /sources/pass.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)pass:* 2 | case $group in 3 | passwords) 4 | pass ls $word 5 | ;; 6 | pass) 7 | pass help $word 8 | ;; 9 | esac 10 | -------------------------------------------------------------------------------- /sources/perldoc.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)(perldoc:argument-rest|perl:option-M-1) 2 | [[ $group != option ]] && perldoc $word | bat -lman 3 | -------------------------------------------------------------------------------- /sources/pic.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)pic: 2 | [[ -f $realpath ]] && pic $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/pip-show.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)pip(|3*):argument-rest 2 | pip show $word | bat -lyaml 3 | -------------------------------------------------------------------------------- /sources/pipx.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)pipx: 2 | pipx $word --help 3 | -------------------------------------------------------------------------------- /sources/pkg-config.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)pkg-config:argument-rest 2 | case $group in 3 | package) 4 | less "$(pkg-config --variable=pcfiledir $word)/$word.pc" 5 | ;; 6 | 'package file') 7 | less ${realpath#--*=} 8 | ;; 9 | esac 10 | -------------------------------------------------------------------------------- /sources/pkg-info.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)pkg:argument-rest 2 | pkg info $word | bat -lyaml 3 | -------------------------------------------------------------------------------- /sources/pkill.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)(pkill:o-argument-rest|killall:argument-1) 2 | grc --colour=on ps -C$word 3 | -------------------------------------------------------------------------------- /sources/plotext.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)plotext:argument-1 2 | plotext $word --help 3 | -------------------------------------------------------------------------------- /sources/pod2html.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)pod2html: 2 | [[ -f $realpath ]] && 3 | pod2html $realpath | bat -lhtml || 4 | less $realpath 5 | -------------------------------------------------------------------------------- /sources/pod2latex.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)pod2latex: 2 | [[ -f $realpath ]] && 3 | pod2latex -out /tmp/pod2latex $realpath && 4 | bat --color=always /tmp/pod2latex.tex || 5 | less $realpath 6 | -------------------------------------------------------------------------------- /sources/pod2man.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)pod2man: 2 | [[ -f $realpath ]] && 3 | pod2man $realpath | bat -lnroff || 4 | less $realpath 5 | -------------------------------------------------------------------------------- /sources/pod2texi.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)pod2texi: 2 | [[ -f $realpath ]] && 3 | pod2texi $realpath || 4 | less $realpath 5 | -------------------------------------------------------------------------------- /sources/pod2text.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)pod2text: 2 | [[ -f $realpath ]] && 3 | pod2text $realpath | bat -lman || 4 | less $realpath 5 | -------------------------------------------------------------------------------- /sources/pod2usage.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)pod2usage: 2 | [[ -f $realpath ]] && 3 | pod2usage $realpath | bat -lhelp || 4 | less $realpath 5 | -------------------------------------------------------------------------------- /sources/podchecker.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)podchecker: 2 | [[ -f $realpath ]] && 3 | podchecker $realpath || 4 | less $realpath 5 | -------------------------------------------------------------------------------- /sources/poetry.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)poetry: 2 | case $group in 3 | command) 4 | poetry $word --help 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/progress.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)progress:* 2 | case $group in 3 | 'external command') 4 | progress -c $word 5 | ;; 6 | 'process ID') 7 | progress -p $word 8 | ;; 9 | esac 10 | -------------------------------------------------------------------------------- /sources/ps.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)(kill|ps):argument-rest --preview-window=down:3:wrap 2 | if [[ $OSTYPE == darwin* ]]; then 3 | alias -g -- --no-headers='| tail -n1' 4 | fi 5 | [[ $group == 'process ID' ]] && 6 | ps -p$word -wocommand --no-headers | bat -lsh 7 | -------------------------------------------------------------------------------- /sources/pydoc.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)pydoc:argument-rest 2 | case $group in 3 | option) ;; 4 | *) 5 | pydoc $word | bat -lman 6 | ;; 7 | esac 8 | -------------------------------------------------------------------------------- /sources/pyenv.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)pyenv: 2 | pyenv help $word | bat -lhelp 3 | -------------------------------------------------------------------------------- /sources/pygmentize.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)pygmentize:* 2 | case $group in 3 | L) 4 | pygmentize -L $word | bat -lrst 5 | ;; 6 | *) 7 | [[ -f ${realpath#--*=} ]] && pygmentize ${realpath#--*=} || less ${realpath#--*=} 8 | ;; 9 | esac 10 | -------------------------------------------------------------------------------- /sources/python.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)python:option-m-1 2 | pydoc $word | bat -lman 3 | -------------------------------------------------------------------------------- /sources/qdbus.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)qdbus: 2 | qdbus $word 3 | -------------------------------------------------------------------------------- /sources/rake.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)rake:argument-rest 2 | rake -Bn $word 3 | -------------------------------------------------------------------------------- /sources/read.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|)read:argument-1 2 | case $group in 3 | varprompt) 4 | echo ${(P)word} 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/readelf.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)readelf:argument-rest 2 | readelf --demangle -a $realpath 3 | -------------------------------------------------------------------------------- /sources/readlink.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)readlink:argument-rest 2 | readlink $realpath 3 | -------------------------------------------------------------------------------- /sources/refer.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)refer: 2 | [[ -f $realpath ]] && refer $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/ri.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)(ri|gem-rdoc):argument-rest 2 | ri $word 3 | -------------------------------------------------------------------------------- /sources/rlwrap.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)rlwrap:argument-1 2 | less =$word 3 | -------------------------------------------------------------------------------- /sources/rmmod.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)rmmod:argument-rest 2 | lsmod | head -n1 3 | lsmod | grep -E "^$word\>" 4 | -------------------------------------------------------------------------------- /sources/ruff-check.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)ruff-command-check:argument-rest 2 | [[ -f $realpath ]] && ruff check --show-fixes --show-source -e $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/ruff-generate-shell-completion.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)ruff-command-generate-shell-completion:argument-1 2 | case $group in 3 | shell) 4 | ruff generate-shell-completion $word | bat -pl$word 2>/dev/null || 5 | ruff generate-shell-completion $word 6 | ;; 7 | esac 8 | -------------------------------------------------------------------------------- /sources/ruff-rule.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)ruff-command-rule:argument-1 2 | case $group in 3 | 'rule -- Rule to explain') 4 | ruff rule $word | mdcat 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/ruff.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)ruff(|ruff-command-help):argument-1 2 | case $group in 3 | 'ruff '(help |)'commands') 4 | ruff help $word | bat -plhelp 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/run-help.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|)run-help:argument-rest 2 | # NOTE: `run-help` is an alias of `man` in zsh by default, 3 | # which means `run-help` will use `man`'s completion. 4 | # you must add the following code to your `~/.zshrc` to enable and unalias it: 5 | # 6 | # ```zsh 7 | # autoload -Uz run-help && (($+aliases[run-help])) && unalias run-help 8 | # ``` 9 | # 10 | # true `run-help` can display the help of zsh built-in commands 11 | # while `man` can display the help of external commands 12 | run-help $word 13 | -------------------------------------------------------------------------------- /sources/rustup.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)rustup:argument-2 2 | rustup help $word | bat -plhelp 3 | -------------------------------------------------------------------------------- /sources/scp.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)(scp|rsync):argument-rest 2 | case $group in 3 | file) 4 | less ${realpath#--*=} 5 | ;; 6 | user) 7 | finger $word 8 | ;; 9 | *host*) 10 | grc --colour=on ping -c1 $word 11 | ;; 12 | esac 13 | -------------------------------------------------------------------------------- /sources/size.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)size: 2 | size -t $realpath 3 | -------------------------------------------------------------------------------- /sources/snap.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)snap: 2 | case $group in 3 | option) 4 | snap help $word | bat -lhelp 5 | ;; 6 | argument) 7 | snap list $word 2>/dev/null 8 | ;; 9 | esac 10 | -------------------------------------------------------------------------------- /sources/soelim.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)soelim: 2 | [[ -f $realpath ]] && soelim $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/source-highlight.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)source-highlight: 2 | [[ -f $realpath ]] && source-highlight $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/sqlite3.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)sqlite3:argument-1 2 | [[ -f $realpath ]] && 3 | yes .q | sqlite3 $realpath | bat -lsql || 4 | less $realpath 5 | -------------------------------------------------------------------------------- /sources/ss.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)ss:values 2 | case $group in 3 | option) 4 | [[ $word == -(h|-help) ]] && 5 | ss $word | bat -lhelp || 6 | grc --colour=on ss $word 7 | ;; 8 | esac 9 | -------------------------------------------------------------------------------- /sources/stat.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)stat:argument-rest 2 | stat $realpath 3 | -------------------------------------------------------------------------------- /sources/strings.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)strings:argument-rest 2 | strings $realpath 3 | -------------------------------------------------------------------------------- /sources/sudo.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(-equal-:|(\\|*/|)(sudo|proxychains|strace):argument-1|pudb:option--pre-run-1) 2 | [[ $group == 'external command' ]] && less =$word 3 | -------------------------------------------------------------------------------- /sources/svn.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:((\\|*/|)svn:argument-1|svn-help:argument-rest) 2 | svn help $word | bat -lhelp 3 | -------------------------------------------------------------------------------- /sources/sysctl.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)sysctl:argument-rest 2 | case $group in 3 | 'sysctl variable') 4 | sysctl $realpath | bat -ltoml 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/systemctl-cat.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:systemctl-cat:* 2 | SYSTEMD_COLORS=false systemctl cat -- $word | bat -lini 3 | -------------------------------------------------------------------------------- /sources/systemctl-help.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:systemctl-help:* 2 | systemctl help -- $word 2>/dev/null | bat -lhelp 3 | -------------------------------------------------------------------------------- /sources/systemctl-list-dependencies.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)systemctl-list-dependencies:* 2 | case $group in 3 | unit) 4 | systemctl list-dependencies -- $word 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/systemctl-show.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:systemctl-show:* 2 | systemctl show $word | bat -lini 3 | -------------------------------------------------------------------------------- /sources/systemctl-status.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:systemctl-(status|(re|)start|(dis|en)able|stop):* 2 | systemctl status -- $word 3 | -------------------------------------------------------------------------------- /sources/tar.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)tar: 2 | tar tvaf $word 3 | -------------------------------------------------------------------------------- /sources/tbl.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)tbl: 2 | [[ -f $realpath ]] && tbl $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/texdoc.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)texdoc:values 2 | yes | texdoc -l $word 2>/dev/null | head -n-1 3 | -------------------------------------------------------------------------------- /sources/tinymist-completion.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)tinymist-command-completion:argument-1 2 | case $group in 3 | shell) 4 | tinymist completion $word | bat -pl$word 2>/dev/null || 5 | tinymist completion $word 6 | ;; 7 | esac 8 | -------------------------------------------------------------------------------- /sources/tinymist.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)tinymist(|-command-help):argument-1 2 | case $group in 3 | 'tinymist '(help |)'commands') 4 | tinymist help $word | bat -plhelp 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/tmux-show-environment.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:tmux-(show|set)-environment:argument-rest 2 | tmux show-environment -g $word | bat -lsh 3 | -------------------------------------------------------------------------------- /sources/tmux-show-hook.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:tmux-(show-hooks|set-hook):argument-rest 2 | tmux show-hook -g $word 3 | -------------------------------------------------------------------------------- /sources/tmux-show-options.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:tmux-(show-options|set-option):argument-rest 2 | tmux show-options -gq $word | bat -ltsv 3 | -------------------------------------------------------------------------------- /sources/tmux-show-window-options.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:tmux-(show-window-options|set-window-option):argument-rest 2 | tmux show-window-options -g $word | bat -ltsv 3 | -------------------------------------------------------------------------------- /sources/tmux.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:tmux:argument-rest 2 | case $word in 3 | (show|set)(env|-environment)) 4 | tmux ${word/set/show} -g | bat -lsh 5 | ;; 6 | (show|set)(-hook?|(-window)-option?|w|)) 7 | tmux ${word/set/show} -g | bat -ltsv 8 | ;; 9 | (show|set)(msgs|-message?)) 10 | tmux ${word/set/show} | bat -llog 11 | ;; 12 | (show|set)(b|-buffer)) 13 | tmux ${word/set/show} 14 | ;; 15 | (ls|list-)*) 16 | tmux $word 17 | ;; 18 | esac 19 | -------------------------------------------------------------------------------- /sources/toolbox.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)toolbox: 2 | case $group in 3 | completions) 4 | toolbox help $word | bat -plman 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/tput.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)tput:set3-argument-1 2 | tput $word 3 | -------------------------------------------------------------------------------- /sources/troff.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)troff: 2 | [[ -f $realpath ]] && troff $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/type.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)type:argument-rest 2 | type $word 3 | -------------------------------------------------------------------------------- /sources/typst.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)typst(|-command-help):argument-1 2 | typst help $word | bat -lhelp 3 | -------------------------------------------------------------------------------- /sources/udisksctl-info.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)udisksctl-info:* 2 | case $group in 3 | 'block device') 4 | udisksctl info -b $word | bat -lyaml 5 | ;; 6 | 'object path') 7 | udisksctl info -p $word | bat -lyaml 8 | ;; 9 | drive) 10 | udisksctl info -d $word | bat -lyaml 11 | ;; 12 | esac 13 | -------------------------------------------------------------------------------- /sources/ulimit.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)ulimit:options 2 | ulimit $word | bat -lhelp 3 | -------------------------------------------------------------------------------- /sources/uname.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)uname:options 2 | uname $word | bat -lhelp 3 | -------------------------------------------------------------------------------- /sources/uncompress.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)uncompress:argument-rest 2 | [[ -f $realpath ]] && uncompress -c $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/unlz4.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)unlz4:misc-argument-rest 2 | [[ -f $realpath ]] && unlz4 -c $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/unlzma.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)unlzma:argument-rest 2 | [[ -f $realpath ]] && unlzma -c $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/unzip.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)unzip:argument-1 2 | [[ -f $realpath ]] && unzip -Z $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/unzstd.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)unzstd: 2 | [[ -f $realpath ]] && unzstd -c $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/uv-generate-shell-completion.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)uv-command-generate-shell-completion:argument-1 2 | case $group in 3 | shell) 4 | uv generate-shell-completion $word | bat -pl$word 2>/dev/null || 5 | uv generate-shell-completion $word 6 | ;; 7 | esac 8 | -------------------------------------------------------------------------------- /sources/uv.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)uv:argument-1 2 | uv help $word | bat -lhelp 3 | case $group in 4 | 'uv commands') 5 | uv help $word | bat -lhelp 6 | ;; 7 | esac 8 | -------------------------------------------------------------------------------- /sources/vared.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:((-parameter-|unset):|(export|typeset|declare|local):argument-rest|vared:argument-1) 2 | # -brace-parameter- will `fork/exec /usr/bin/zsh: invalid argument` 3 | echo ${(P)word} 4 | -------------------------------------------------------------------------------- /sources/vimpager.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)vimpager: 2 | [[ -f $realpath ]] && vimpager $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/wezterm-command-shell-completion.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)wezterm-command-shell-completion:option--shell-1 2 | wezterm shell-completion --shell=$word | bat -lsh 3 | -------------------------------------------------------------------------------- /sources/wezterm-command-start.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)wezterm-command-start:argument-rest 2 | less =$word 3 | -------------------------------------------------------------------------------- /sources/wezterm.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)wezterm:argument-1 2 | wezterm help $word | bat -lhelp 3 | -------------------------------------------------------------------------------- /sources/xdg-settings.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)xdg-settings: 2 | file=$(xdg-settings get $word) 3 | [[ -n $file ]] && less {/usr,~/.local,~/.local/state/nix/profile,/run/current-system/sw}/share/applications/$file(N) 4 | -------------------------------------------------------------------------------- /sources/xxd.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)xxd: 2 | [[ $group == file && -f $realpath ]] && xxd $realpath || less $realpath 3 | -------------------------------------------------------------------------------- /sources/yarn.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)yarn:argument-1 2 | yarn help $word | bat -lhelp 3 | -------------------------------------------------------------------------------- /sources/zellij-command-action.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)zellij-command-action:argument-1 2 | zellij action $word --help 3 | -------------------------------------------------------------------------------- /sources/zellij.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)zellij:argument-1 2 | zellij $word --help 3 | -------------------------------------------------------------------------------- /sources/zinit.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|)zinit-* 2 | case $group in 3 | plugins) 4 | less ~/.local/share/zinit/plugins/$word/README* 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/zipdetails.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)zipdetails: 2 | zipdetails $realpath 2>/dev/null || less $realpath 3 | -------------------------------------------------------------------------------- /sources/zmodload.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|)zmodload:argument-rest 2 | case $group in 3 | 'module file') 4 | zmodload -d $ctxt[hpre]$word 5 | ;; 6 | esac 7 | -------------------------------------------------------------------------------- /sources/zstat.zsh: -------------------------------------------------------------------------------- 1 | # :fzf-tab:complete:(\\|*/|)zstat:set1-argument-rest 2 | zmodload zsh/stat 3 | case $group in 4 | file) 5 | zstat $realpath 6 | ;; 7 | esac 8 | --------------------------------------------------------------------------------