j-pls

Crates.ioj-pls
lib.rsj-pls
version0.4.2
sourcesrc
created_at2023-12-20 15:32:56.408394
updated_at2024-01-16 19:32:31.769077
descriptionquick n' dirty non-global aliases/scripts
homepage
repository
max_upload_size
id1075394
size19,657
Jamie (JamieH01)

documentation

README

plssssssssss

pls is a scripting utility to create local messy aliases quickly. remember that pls is not finished and has many features planned!

Installation

pls is available on crates.io as j-pls.

cargo install j-pls

Writing Commands

pls looks for a rules.pls file to pull rules from. Rule syntax looks like this:

build: cargo build --release 
run: cargo run

# install binary locally
install-local: 
    cargo build 
    cargo install --path . --force

# say hi!
#arguments will be enviroment variables in the given script
greet [name]:
    echo hello $name!

Run pls with -l to view available rules. You can also use -v for more detailed info about a rule. To use a rule, call it with pls!

pls build

pls has a special rule, called do, that will be called when running pls with no arguments.

do: 
    g++ src/* -o target/main.out 
    ./taget/main.out

Configuration

pls looks in $XDG_CONFIG/pls for configuration files.

# file: $XDG_CONFIG/pls/config.pls
# these are available settings with their defaults

# where pls will look for local rules, relative to cwd
look: rules.pls

# where pls will look for global rules, relative to $XDG_CONFIG/pls/ 
global: global.pls

# if commands should be printed before running
show_cmd: false

# show extra info about rules when listing
rich: true

Todo

Current features being worked on, in order of priority.

  • multiline commands
  • global rules
  • arguments
  • variables
  • calling other rules
  • attributes
  • confirm prompts
  • more advanced scripting..(?)
Commit count: 0

cargo fmt