commit 7ce613afdf94d51be2f367ebfb8cff6d67580835
parent 4c20084c5ad45171c0a18bb5739595bdbc833db9
Author: finwo <finwo@pm.me>
Date: Mon, 20 May 2019 13:31:04 +0200
Added composer support in zshrc
Diffstat:
1 file changed, 19 insertions(+), 0 deletions(-)
diff --git a/zsh/home/.zshrc b/zsh/home/.zshrc
@@ -14,6 +14,25 @@ bindkey -v
[[ -n "${key[PageDown]}" ]] && bindkey "${key[PageDown]}" history-beginning-search-forward
# }}}
+# Custom commands {{{
+
+function getComposer {
+ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
+ php composer-setup.php
+ php -r "unlink('composer-setup.php');"
+}
+
+function composer {
+ for i in $(echo {,~/bin/,/usr/bin/,/usr/local/bin/}composer{.phar,}); do
+ [ -f "$i" ] || continue
+ php "$i" "$@"
+ return $?
+ done
+ echo "Composer is not installed on this system"
+ return 1
+}
+
+# }}}
# Aliases {{{
# VI