0
編輯:例如工作在純的zsh。我的prezto安裝不起作用。看起來像prezto中的錯誤。意外的zsh全球別名擴展
我試圖別名sponge
中的zsh SP
。但結果令人驚訝。
沒有全球別名:
❯ echo xxx >! xxx
❯ cat xxx | sponge xxx
❯ cat xxx # non-empty file
xxx
隨着全球別名:
❯ echo xxx >! xxx
❯ alias -g SP='| sponge '
❯ cat xxx SP xxx
❯ cat xxx
(empty file, no lines are shown here)
有什麼奇怪的行爲的原因是什麼?我怎樣才能使它工作?