Macでsayコマンド使おうとしてハマった
zsh + oh-my-zshの環境でsayコマンドを使おうとしたら、こうなりました。
$ say -v Alex 'Hi'
say:1: bad option: -v
$ grep -r 'say' .oh-my-zsh/*
(中略)
.oh-my-zsh/plugins/perl/perl.plugin.zsh:# say - append a newline to 'print'
.oh-my-zsh/plugins/perl/perl.plugin.zsh:say() {
.oh-my-zsh/themes/humza.zsh-theme: # should it say b, kb, Mb, or Gb
$ vim .oh-my-zsh/plugins/perl/perl.plugin.zsh
(60行目あたり)
# say - append a newline to 'print'
say() {
print "$1\n"
}
こいつか! perlプラグインを外してもよかったのですが、直接コメントアウトして、ようやく本来のsayコマンドを使えるようになりました。