aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-04-29 13:28:17 +0900
committernsfisis <nsfisis@gmail.com>2024-04-29 13:28:17 +0900
commit91738328e0a4ace061fbcc81aec143dd991856dc (patch)
tree28bd911cfa99c0f9e37d6f1647586ae42d328640
parent27fb827aef608c9d36aef378d2271b8ac760456e (diff)
downloaddotfiles-91738328e0a4ace061fbcc81aec143dd991856dc.tar.gz
dotfiles-91738328e0a4ace061fbcc81aec143dd991856dc.tar.zst
dotfiles-91738328e0a4ace061fbcc81aec143dd991856dc.zip
zsh: add completion for Composer custom commands
-rw-r--r--.zshrc18
1 files changed, 18 insertions, 0 deletions
diff --git a/.zshrc b/.zshrc
index 5a7c25f..74e8cf9 100644
--- a/.zshrc
+++ b/.zshrc
@@ -437,6 +437,24 @@ fi
alias direnvnix='nix flake new -t github:nix-community/nix-direnv'
+
+
+# fpath=(~/.config/zsh/completions $fpath)
+# autoload -Uz _my_composer
+compdef _my_composer composer composer.phar
+
+# TODO
+# Move these definitions to a separate file.
+autoload -Uz _composer
+
+# Fall back to the default file/dir completion if the existing completion
+# doesn't return anything.
+function _my_composer() {
+ _composer "$@" || _files "$@"
+}
+
+
+
export LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH
# To override system-provided Ruby with brewed Ruby