Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --quiet flag for "apply", "install" and "update" subcommands #64

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add --quiet flag for "apply", "install" and "update" subcommands
JamyGolden committed Sep 25, 2024
commit eaf65173f0417c82444279c56e85547312d8f4d6
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,10 @@

## Unreleased

### Added

- Add `--quiet` flag for `apply`, `install` and `update` subcommands

### Fixed

- Fix bug where Tinty won't update after custom schemes have been built
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -160,17 +160,17 @@ The following is a table of the available subcommands for the CLI tool (Tinty),

| Subcommand | Description | Arguments | Example Usage |
|------------|-----------------------------------------------------|----------------------|--------------------------------------------|
| `install` | Installs requirements for the configuration. | - | `tinty install` |
| `list` | Lists all available themes. | Optional argument `--custom-schemes` to list saved custom theme files using `tinty generate-scheme` | `tinty list` |
| `apply` | Applies a specific theme. | `<scheme_system>-<scheme_name>`: Name of the system and scheme to apply. | `tinty apply base16-mocha` |
| `update` | Updates the templates and schemes. | - | `tinty update` |
| `init` | Initializes the tool with the last applied theme otherwise `default-scheme` from `config.toml`. | - | `tinty init` |
| `current` | Displays the currently applied theme. | - | `tinty current` |
| `config` | Displays config related information currently in use by Tinty. Without flags it returns `config.yml` content. | - | `tinty config` |
| `info` | Provides information about themes. | `[<scheme_system>-<scheme_name>]`: Optional argument `--custom-schemes` to provide information on any custom schemes | `tinty info base16-mocha` |
| `build` | Builds the provided base16 or base24 template using [tinted-builder-rust]. | `<DIR>`: Path to the base16 or base24 template directory. | `tinty build path/to/tinted-tmux` |
| `generate-completion` | Generates a shell completion file to source in your shell startup file (`*rc`). | `<shell_name>`: Name of the shell to generate a completion script for. Supports `bash`, `elvish`, `fish`, `powershell`, `zsh` | `tinty generate-completion bash` |
| `generate-scheme` | Generates a yaml scheme file with colors inferred from provided image. | `<image_path>`: Path to image. Either `<outpath>` (`-` value to print to stdout) or `--save` to save for use within `tinty` | `tinty generate-completion bash` |
| `install` | Installs requirements for the configuration. | - | `tinty install` |
| `update` | Updates the templates and schemes. | - | `tinty update` |

Some subcommands support additional flags and options to modify their behavior:

@@ -183,7 +183,7 @@ Some subcommands support additional flags and options to modify their behavior:
| `--config-path` | Shows the config.yml path. | `config` | - | `tinty config --config-path` |
| `--data-dir-path` | Shows the data directory path. | `config` | - | `tinty config --data-dir-path` |
| `--custom-schemes` | Lists saved custom theme files manually created or generated by `tinty generate-scheme` | `list` | - | `tinty list --custom-schemes` |
| `--quiet` | Silences stdout and stderr printing | `build` | - | `tinty build . --quiet` |
| `--quiet` | Boolean flag which silences stdout prints | `apply`, `build`, `install`, `update` | `false` | `tinty build . --quiet` |

## Configuration

6 changes: 3 additions & 3 deletions contrib/completion/tinty.bash
Original file line number Diff line number Diff line change
@@ -121,7 +121,7 @@ _tinty() {
return 0
;;
tinty__apply)
opts="-c -d -h --config --data-dir --help $($1 list)"
opts="-q -c -d -h --quiet --config --data-dir --help $($1 list)"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
@@ -578,7 +578,7 @@ _tinty() {
return 0
;;
tinty__install)
opts="-c -d -h --config --data-dir --help"
opts="-q -c -d -h --quiet --config --data-dir --help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
@@ -638,7 +638,7 @@ _tinty() {
return 0
;;
tinty__update)
opts="-c -d -h --config --data-dir --help"
opts="-q -c -d -h --quiet --config --data-dir --help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
6 changes: 6 additions & 0 deletions contrib/completion/tinty.elvish
Original file line number Diff line number Diff line change
@@ -121,6 +121,8 @@ set edit:completion:arg-completer[tinty] = {|@words|
cand --config 'Optional path to the tinty config.toml file'
cand -d 'Optional path to the tinty data directory'
cand --data-dir 'Optional path to the tinty data directory'
cand -q 'Silence stdout'
cand --quiet 'Silence stdout'
cand -h 'Print help'
cand --help 'Print help'
}
@@ -129,6 +131,8 @@ set edit:completion:arg-completer[tinty] = {|@words|
cand --config 'Optional path to the tinty config.toml file'
cand -d 'Optional path to the tinty data directory'
cand --data-dir 'Optional path to the tinty data directory'
cand -q 'Silence stdout'
cand --quiet 'Silence stdout'
cand -h 'Print help'
cand --help 'Print help'
}
@@ -137,6 +141,8 @@ set edit:completion:arg-completer[tinty] = {|@words|
cand --config 'Optional path to the tinty config.toml file'
cand -d 'Optional path to the tinty data directory'
cand --data-dir 'Optional path to the tinty data directory'
cand -q 'Silence stdout'
cand --quiet 'Silence stdout'
cand -h 'Print help'
cand --help 'Print help'
}
Loading