CLI tool to edit file system tree using a text editor, inspired by oil.nvim
-
List all files in the directory recursively and write the list into a temporary file.
-
Open the temporary file in the text editor (configured by the user with
$VISUAL
or$EDITOR
). -
User edits the content of the buffer to reflect the desired state.
-
Upon saving, determine the necessary file system operations (create/copy/move/delete) to transform the initial file tree into the new one.
-
If the user confirms, apply those operations.
Bulk create files
bulk_create_f32_w160_h40-1.mov
Bulk rename files
bulk_rename_f32_w160_h40-1.mov
Swap 2 files
swap_2_file_f32_w160_h40-1.mov
Set $VISUAL
or $EDITOR
environment variable to your editor of choice:
- Neovim:
export VISUAL=nvim
- Nano:
export VISUAL=nano
$ tree-edit --help
Edit file system tree using a text editor
Usage: tree-edit [OPTIONS] [DIR]
Arguments:
[DIR] Directory to operate on, default to current working directory
Options:
--no-git-ignore When set, .gitignore will not be respected
--hidden Include hidden files
-h, --help Print help
-V, --version Print version
$ VISUAL=nvim tree-edit .
$ git clone [email protected]:vhminh/tree-edit.git
$ cd tree-edit
$ cargo install --bin tree-edit --path .
Run unit test
$ cargo test
Run fuzz test
$ time cargo run --release --bin fuzz