liebe-magi / fuga

A CLI tool to operate files or directories in 2 steps.
MIT License
3 stars 0 forks source link

Crates.io Crates.io build All Contributors

๐Ÿ“ฆ FUGA ๐Ÿ“ฆ

logo

A CLI tool to operate files or directories in 2 steps.

ๆ—ฅๆœฌ่ชžใฎREADMEใฏใ“ใกใ‚‰

๐Ÿ“ฆ DESCRIPTION

๐Ÿ“ฆ INSTALLATION

Pre-built Binaries

Build with Cargo

cargo install fuga

Verify Installation

$ fuga -V
fuga v0.1.1

๐Ÿ“ฆ USAGE

A CLI tool to operate files or directories in 2 steps.

Usage: fuga <COMMAND>

Commands:
  mark        Set the path of the target file or directory
  copy        Copy the marked file or directory
  move        Move the marked file or directory
  link        Make a symbolic link to the marked file or directory
  completion  Generate the completion script
  version     Show the version of the tool
  help        Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version

Setting the Target File

$ fuga mark target_file.txt
โœ… : ๐Ÿ“„ target_file.txt has marked.
$ fuga mark --show
โ„น๏ธ : ๐Ÿ“„ /home/user/path/to/file/target_file.txt
$ fuga mark --reset
โœ… : The marked path has reset.

File Operations

Three file operations are possible: Copy, Move, and Symbolic Link creation.

Copy

$ cd test_dir_copy

$ fuga copy
โ„น๏ธ : Start copying ๐Ÿ“„ target_file.txt from /home/user/path/to/file/target_file.txt
โœ… : ๐Ÿ“„ target_file.txt has copied.
$ fuga copy test_dir_copy
โ„น๏ธ : Start copying ๐Ÿ“„ test_dir_copy/target_file.txt from /home/user/path/to/file/target_file.txt
โœ… : ๐Ÿ“„ test_dir_copy/target_file.txt has copied.

$ fuga copy copy.txt
โ„น๏ธ : Start copying ๐Ÿ“„ copy.txt from /home/user/path/to/file/target_file.txt
โœ… : ๐Ÿ“„ copy.txt has copied.

Move

$ cd test_dir_move

$ fuga move
โ„น๏ธ : Start moving ๐Ÿ“„ target_file.txt from /home/user/path/to/file/target_file.txt
โœ… : ๐Ÿ“„ target_file.txt has moved.
$ fuga move test_dir_move
โ„น๏ธ : Start copying ๐Ÿ“„ test_dir_move/target_file.txt from /home/user/path/to/file/target_file.txt
โœ… : ๐Ÿ“„ test_dir_move/target_file.txt has moved.

$ fuga move move.txt
โ„น๏ธ : Start moving ๐Ÿ“„ move.txt from /home/user/path/to/file/target_file.txt
โœ… : ๐Ÿ“„ move.txt has moved.

Symbolic Link

$ cd test_dir_link

$ fuga link
โ„น๏ธ : Start making symbolic link ๐Ÿ“„ target_file.txt from /home/user/path/to/file/target_file.txt
โœ… : ๐Ÿ“„ target_file.txt has made.
$ fuga link test_dir_link
โ„น๏ธ : Start making symbolic link ๐Ÿ“„ test_dir_link/target_file.txt from /home/user/path/to/file/target_file.txt
โœ… : ๐Ÿ“„ test_dir_link/target_file.txt has made.

$ fuga link link.txt
โ„น๏ธ : Start making symbolic link ๐Ÿ“„ link.txt from /home/user/path/to/file/target_file.txt
โœ… : ๐Ÿ“„ link.txt has made.

Generating Completion Scripts

# For fish
$ fuga completion fish > ~/.config/fish/completions/fuga.fish

Contributors โœจ

Thanks goes to these wonderful people (emoji key):

ใ‚Šใƒผใน
ใ‚Šใƒผใน

๐Ÿ“† ๐Ÿ‘€ ๐Ÿ’ป ๐Ÿ“–

This project follows the all-contributors specification. Contributions of any kind welcome!