summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--halfway/completion.zsh12
1 files changed, 12 insertions, 0 deletions
diff --git a/halfway/completion.zsh b/halfway/completion.zsh
new file mode 100644
index 0000000..da4d070
--- /dev/null
+++ b/halfway/completion.zsh
@@ -0,0 +1,12 @@
+# Make completion case insensitive.
+zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
+# Disable sort when completing `git checkout`.
+zstyle ':completion:*:git-checkout:*' sort false
+# Set descriptions format to enable group support.
+zstyle ':completion:*:descriptions' format '[%d]'
+# Set list-colors to enable filename colorizing.
+zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
+# Preview directory's content with eza when completing cd.
+zstyle ':fzf-tab:complete:cd:*' fzf-preview 'eza -1 --color=always $realpath'
+# Switch group using `,` and `.`.
+zstyle ':fzf-tab:*' switch-group ',' '.'