tcsh shell 将带引号和 * 的参数传递给别名

tcsh shell pass arguments with quotes and * to alias

1.I试图在 tcsh shell 中为我的“查找”命令添加别名,最后我希望它看起来像这样:

find path file_name

而不是:find path -name "*file name*"

path为查找路径,文件名为文件名的部分

我试过这个:

alias fn  'find \!:1 -name  "*\!:2*"  '

而且它不起作用。知道为什么吗?

  1. 如何打印正在执行的命令 before/after?我想在发送别名命令后查看真正的 运行 - 查看执行的最终命令是什么。

You musn't be afraid to dream a little bigger, darling.

> alias fn 'echo find \!:1 -name \"\*\!:2\*\"; eval find \!:1 -name \"\*\!:2\*\"'