Crates.io | iforgor |
lib.rs | iforgor |
version | |
source | src |
created_at | 2024-07-12 14:13:05.316456 |
updated_at | 2024-10-22 17:00:19.0765 |
description | The CLI tool for all those commands you forget about |
homepage | |
repository | https://github.com/nanocryk/iforgor |
max_upload_size | |
id | 1300749 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
The CLI tool for all those commands you forget about
Run cargo install iforgor
.
Add script source files using iforgor source add <PATH>
(see exemple).
Each entry follow the following format:
[[entries]]
name = "WRITE NAME HERE"
script = "WRITE SCRIPT HERE"
Entry can also contain the following optional fields:
only_on = "OS"
: script will only be loaded on provided OS. Accepts Linux
and Windows
.args = ["Arg 1", "Arg 2"]
: list arguments labels that will be printed when calling.args_default = ["Default 1"]
: list of arguments default values.shell = "SHELL
: selects the shell to execute the script with. Supports Sh
(default for Linux),
Cmd
(default for Windows) and Powershell
.only_in_dir
: entry only appears if the current directory path matches the provided UNIX glob pattern.risky
: if true it marks the command as risky, and will ask confirmation (which defaults to false if an empty answer is provided). Avoids running dangerous scripts by mistake.After modifying a source file iforgor reload
should be called to update its internal list. Note that it will reset default arguments values.
Run iforgor
to start the interactive selection menu, which displays a list of commands that can be
selected using the up/down arrow keys and Enter. By default the search input is empty and the list
displays the command history (if any). Characters can be typed to search among the registered script
names.
Once selected the script is run. If the entry have an args
list it asks you about the arguments
values. It'll then run the script and print its output. Execution can be halt using Ctrl+C
, which
will only halt the script execution and not iforgor
. Once the script stops, it displays the return
status code and wait for Enter
to be pressed before showing back the selection menu.