はじめに

この資料は Rust 製のコマンドラインツール as-tree について紹介するものです。

Rustの環境構築やツールのインストール方法については以下を参照してください

Rust開発環境を整える

as-tree について

as-tree は標準入力からパスのリストをうけとり、標準出力にツリーとして表示するツールです。

GitHub - jez/as-tree: Print a list of paths as a tree of paths 🌳

as-tree のインストールは次のように行います。

% cargo install -f --git <https://github.com/jez/as-tree>

使用例

このツールは、fd のようなツールと組み合わせると非常に便利になり、tree 単独よりもうまくファイルをリストすることができます。

% fd --exclude test | as-tree
.
├── LICENSE.md
├── Makefile
├── README.md
├── WORKSPACE
├── bazel
├── main
│   ├── BUILD
│   └── main.cc
├── third_party
│   ├── BUILD
│   ├── externals.bzl
│   └── spdlog.BUILD
└── tools
    ├── BUILD
    ├── clang.bzl
    └── scripts
        ├── build_compilation_db.sh
        └── generate_compdb_targets.sh

ドキュメント

ライセンス