A CLI tool to operate files or directories in 2 steps.
fugue
はファイル操作を2ステップで行うCLIツールです。mv
,cp
,ln
コマンドなどの代替コマンドとして開発しました。fugue mark
によりマーキングし、別のディレクトリに移動した後にコピーや移動を実行できます。cargo
コマンドによりビルドすることでインストールできます。
$ cargo install fugue-box
$ fugue -V
fugue v0.0.1
```
USAGE:
fugue
OPTIONS: -h, --help Print help information -V, --version Print version information
SUBCOMMANDS: copy Copy the marked file or directory help Print this message or the help of the given subcommand(s) link Make a symbolic link to the marked file or directory mark Set the path of the target file or directory move Move the marked file or directory version Show the version of the tool ```
fugue mark <TARGET>
で操作対象とするファイルやディレクトリをマーキングします。
$ fugue mark target_file.txt
✅ : 📄 target_file.txt has marked.
fugue mark --show
で確認できます。
$ fugue mark --show
ℹ️ : 📄 /home/user/path/to/file/target_file.txt
fugue mark --reset
で解除できます。
$ fugue mark --reset
✅ : The marked path has reset.
以下の3つのファイル操作が可能です。
fugue copy
でマーキング中のファイルやディレクトリをコピーできます。``` $ cd testdircopy
$ fugue copy
ℹ️ : Start copying 📄 targetfile.txt from /home/user/path/to/file/targetfile.txt
✅ : 📄 target_file.txt has copied.
```
``` $ fugue copy testdircopy ℹ️ : Start copying 📄 testdircopy/targetfile.txt from /home/user/path/to/file/targetfile.txt ✅ : 📄 testdircopy/target_file.txt has copied.
$ fugue copy copy.txt ℹ️ : Start copying 📄 copy.txt from /home/user/path/to/file/target_file.txt ✅ : 📄 copy.txt has copied. ```
fugue move
でマーキング中のファイルやディレクトリを移動できます。``` $ cd testdirmove
$ fugue move
ℹ️ : Start moving 📄 targetfile.txt from /home/user/path/to/file/targetfile.txt
✅ : 📄 target_file.txt has moved.
```
``` $ fugue move testdirmove ℹ️ : Start copying 📄 testdirmove/targetfile.txt from /home/user/path/to/file/targetfile.txt ✅ : 📄 testdirmove/target_file.txt has moved.
$ fugue move move.txt ℹ️ : Start moving 📄 move.txt from /home/user/path/to/file/target_file.txt ✅ : 📄 move.txt has moved. ```
fugue link
でマーキング中のファイルやディレクトリへのシンボリックリンクを作成できます。``` $ cd testdirlink
$ fugue link
ℹ️ : Start making symbolic link 📄 targetfile.txt from /home/user/path/to/file/targetfile.txt
✅ : 📄 target_file.txt has made.
```
``` $ fugue link testdirlink ℹ️ : Start making symbolic link 📄 testdirlink/targetfile.txt from /home/user/path/to/file/targetfile.txt ✅ : 📄 testdirlink/target_file.txt has made.
$ fugue link link.txt ℹ️ : Start making symbolic link 📄 link.txt from /home/user/path/to/file/target_file.txt ✅ : 📄 link.txt has made. ```