fuga

Crates.iofuga
lib.rsfuga
version0.1.2
sourcesrc
created_at2023-12-26 08:42:15.07768
updated_at2024-06-26 12:57:29.488173
descriptionA CLI tool to operate files or directories in 2 steps.
homepage
repositoryhttps://github.com/liebe-magi/fuga
max_upload_size
id1080776
size1,710,565
ใ‚Šใƒผใน (liebe-magi)

documentation

README

Crates.io Crates.io build

๐Ÿ“ฆ FUGA ๐Ÿ“ฆ

logo

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

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

๐Ÿ“ฆ DESCRIPTION

  • fuga is a CLI tool that performs file operations in two steps.
  • Developed as an alternative to commands like mv, cp, and ln.
  • Mark files or directories to operate on using fuga mark, and then perform copy or move operations after navigating to another directory.

๐Ÿ“ฆ INSTALLATION

Pre-built Binaries

  • Pre-built binaries for the following architectures are available on releases.

    • aarch64-apple-darwin (Mac - Apple Chip)
    • x86_64-apple-darwin (Mac - Intel Chip)
    • x86_64-unknown-linux-gnu (Linux - Intel Chip)
  • Place the binary for your architecture in a directory included in your system's PATH.

Build with Cargo

  • You can install fuga by building it using the cargo command.
cargo install fuga

Verify Installation

  • If the installation is successful, the version information can be displayed using the following command:
$ 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

  • Mark the file or directory you want to operate on with fuga mark <TARGET>.
$ fuga mark target_file.txt
โœ… : ๐Ÿ“„ target_file.txt has marked.
  • To check the currently marked file or directory, use fuga mark --show.
$ fuga mark --show
โ„น๏ธ : ๐Ÿ“„ /home/user/path/to/file/target_file.txt
  • To unmark a file or directory, use fuga mark --reset.
$ fuga mark --reset
โœ… : The marked path has reset.

File Operations

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

Copy

  • Navigate to the destination directory and use fuga copy to copy the marked file or directory.
$ 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.
  • You can also specify the destination directory or file name.
$ 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

  • Navigate to the destination directory and use fuga move to move the marked file or directory.
$ 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.
  • Similar to copying, you can specify the destination directory or file name.
$ 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

  • Navigate to the directory where you want to create a symbolic link and use fuga link to create a symbolic link to the marked file or directory.
$ 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.
  • You can also specify the destination directory or file name for the symbolic link.
$ 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

  • Use fuga completion <shell> to output a script for command completion. It supports the following five shells:
    • bash
    • elvish
    • fish
    • powershell
    • zsh
# For fish
$ fuga completion fish > ~/.config/fish/completions/fuga.fish
Commit count: 382

cargo fmt