端末コマンドの前にコマンドを実行してください。

端末コマンドの前にコマンドを実行してください。

端末コマンドを実行する前にコマンドを実行する方法はありますか?

たとえば、

> ls -ltr
> "Hello you ran ls -ltr" //this is what I would like to achieve
> ..output of ls -ltr will be here

コマンドを実行する前にechoが実行されていることを確認することは可能ですか?

ありがとう

ベストアンサー1

DEBUG同様に、効果的なプリランフックを設定できるトラップ設定を検討することもできますzsh。バラよりhttps://superuser.com/questions/175799/does-bash-have-a-hook-that-is-run-before-executing-a-command

おすすめ記事