Skip to content

Commit

Permalink
Add "--quiet" flag for "apply", "install" and "update" subcommands (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
JamyGolden authored Sep 25, 2024
1 parent ee020f5 commit dfa05bf
Show file tree
Hide file tree
Showing 15 changed files with 349 additions and 97 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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

Expand Down
6 changes: 3 additions & 3 deletions contrib/completion/tinty.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions contrib/completion/tinty.elvish
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Expand All @@ -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'
}
Expand All @@ -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'
}
Expand Down
Loading

0 comments on commit dfa05bf

Please sign in to comment.