問題
functionsコマンドでローカルエミュレータが挙動がおかしくて3分くらいつまった。
原因
bashとzshでコマンドがちがった。
functionsコマンドはzshシェルに全シェル関数定義を表示するコマンドとして組み込まれている。
解決法
functionsではなくfunctions-emulatorを使う
例
bash
$ functions start
$ functions deploy hogehoge --trigger-http
zsh
$ functions-emulator start
$ functions-emulator deploy hogehoge --trigger-http
余談
過去にGoogleCloudPlatformリポジトリにてissueとしてあがっており、実装の流れが確認できる。
The functions command is a built-in in the ZSH shell. It prints out all the shell function definitions.