aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShohei YOSHIDA <syohex@gmail.com>2026-05-18 16:27:08 +0900
committerShohei YOSHIDA <syohex@gmail.com>2026-05-18 16:27:08 +0900
commit03889306eda287f559d81d1955d7f8eba94fecf3 (patch)
treefa0c8cc93fcc7735bc1a520ee23c7ee36772590b
parentMerge pull request #1265 from zsh-users/update-jest (diff)
downloadzsh-completions-add-peco.tar
zsh-completions-add-peco.tar.gz
zsh-completions-add-peco.tar.bz2
zsh-completions-add-peco.tar.lz
zsh-completions-add-peco.tar.xz
zsh-completions-add-peco.tar.zst
zsh-completions-add-peco.zip
Add peco completionadd-peco
-rw-r--r--src/_peco68
1 files changed, 68 insertions, 0 deletions
diff --git a/src/_peco b/src/_peco
new file mode 100644
index 0000000..406b03a
--- /dev/null
+++ b/src/_peco
@@ -0,0 +1,68 @@
+#compdef peco
+# ------------------------------------------------------------------------------
+# Copyright (c) 2026 Github zsh-users - https://github.com/zsh-users
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+# OTHER DEALINGS IN THE SOFTWARE.
+# ------------------------------------------------------------------------------
+# Description
+# -----------
+#
+# Completion script for peco v0.6.0 (https://github.com/peco/peco)
+#
+# ------------------------------------------------------------------------------
+# Authors
+# -------
+#
+# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
+#
+# ------------------------------------------------------------------------------
+
+local -a filters=(IgnoreCase CaseSensitive SmartCase IRegexp Regexp Fuzzy)
+local -a layouts=(top-down bottom-up top-down-query-bottom)
+
+_arguments \
+ '(- *)'{-h,--help}'[show help message and exit]' \
+ '--query[initial value for query]:query' \
+ '--rcfile[path to the settings file]:file:_files' \
+ '(- *)--version[print the version and exit]' \
+ '(-b --buffer-size)'{-b,--buffer-size}'[number of lines to keep in search buffer]:lines' \
+ '--null[expect NUL(\0) as separator for target/output]' \
+ '--initial-index[position of the initial index of the selection (0 base)]:index' \
+ '--initial-filter[specify the default filter]:filter:($filters)' \
+ '--prompt[specify the prompt string]:prompt' \
+ '--layout[layout to be used(default: top-down)]:layout:($layouts)' \
+ '--select-1[select first item and immediately exit if the input contains only 1 item]' \
+ '--exit-0[exit immediately with status 1 if the input is empty]' \
+ '--select-all[select all items and immediately exit]' \
+ '--on-cancel[specify action on user cancel(default: success)]:action:(success error)' \
+ '--selection-prefix[use a prefix instead of changing line color to indicate currently selected lines]:prefix' \
+ '--exec[execute command instead of finishing/terminating peco]:exec' \
+ '--print-query[print out the current query as first line of output]' \
+ '--color[color mode(default: auto)]:mode:(auto none)' \
+ '--height[display height in lines or percentage(e.g. 10, 50%)]:height' \
+ '*::file:_files'
+
+# Local Variables:
+# mode: Shell-Script
+# sh-indentation: 2
+# indent-tabs-mode: nil
+# sh-basic-offset: 2
+# End:
+# vim: ft=zsh sw=2 ts=2 et