1. 匹配插件
在 NuShell 中是无法使用 grep 或者 egrep 语法的,需要使用这样的功能,需要安装 match 插件:
$ cargo install nu_plugin_match
使用示例:
/opt/workspace/yumingmin/projects> ps -l | match command "^*download*"───┬───────┬───────────┬────────┬────────┬──────────┬─────────┬────────┬──────────────────────────┬─────────────────────────────────────────────────────────# │ pid │ name │ status │ cpu │ mem │ virtual │ parent │ exe │ command───┼───────┼───────────┼────────┼────────┼──────────┼─────────┼────────┼──────────────────────────┼─────────────────────────────────────────────────────────0 │ 16491 │ python3.6 │ Sleep │ 0.0000 │ 152.9 MB │ 2.2 TB │ 1 │ /opt/conda/bin/python3.6 │ python ./scripts/download.py───┴───────┴───────────┴────────┴────────┴──────────┴─────────┴────────┴──────────────────────────┴─────────────────────────────────────────────────────────
2. 安装所有插件
$ cargo install nu_plugin_match nu-pretty-hex nu_table nu_plugin_binaryview nu_plugin_fetch nu_plugin_chart$ cargo install nu_plugin_post nu_plugin_ps nu_plugin_query_json nu_plugin_selector nu_plugin_start$ cargo install nu_plugin_sys nu_plugin_textview nu_plugin_to_bson nu_plugin_to_sqlite nu_plugin_tree nu_plugin_xpath
