shlf 0.7.3

A command-line tool for managing dotconf files
shlf-0.7.3 is not a library.
Visit the last successful build: shlf-0.8.7

Shelf - Dotconf Manager

Shelf CI

Shelf is a command-line tool for managing dotconf files. It allows you to track, list, remove files with ease.

Features

  • Track dotconf files from anywhere in your file system recursively.
  • List all tracked dotfiles.
  • Remove dotconf files recursively from database.

Installation

To install Shelf, you need to have Rust and Cargo installed on your system. If you don't have them, you can install them from rustup.rs.

Once you have Rust and Cargo installed, you can build and install Shelf using the following command:

cargo install --path .

Usage

Shelf provides several commands to manage your dotfiles:

# Add a new dotfile to track
slf cp ~/.bashrc

# List all tracked dotfiles
slf ls

# Remove a dotfile from tracking
slf rm ~/.bashrc

# Interactive selection of dotfiles to track
slf suggest -i

# Show help
slf --help

Each command can be run with -h or --help for more information.

Shell Completion

Shelf supports generating shell completion scripts for various shells. You can generate these scripts using the completion subcommand:

# Generate completion script for Bash
slf completion bash > slf.bash

# Generate completion script for Zsh
slf completion zsh > _slf

# Generate completion script for Fish
slf completion fish > slf.fish

To use the completion scripts:

  • For Bash, add the following line to your ~/.bashrc:

    source /path/to/slf.bash
    
  • For Zsh, place the _slf file in ~/.zfunc, then add source ~/.zfunc/_slf in ~/.zshrc.

  • For Fish, place the slf.fish file in ~/.config/fish/completions.

After setting up the completion script, restart your shell or source the respective configuration file to enable completions for the slf command.

Development

To build the project locally:

cargo build

To run tests:

cargo test

To run the project directly without installing:

cargo run -- [SUBCOMMAND]

Replace [SUBCOMMAND] with the command you want to run, such as cp, ls, or rm.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.