Skip to content

Commit

Permalink
✨ fsfs fully implemented!!
Browse files Browse the repository at this point in the history
  • Loading branch information
jcaillon committed Apr 20, 2024
1 parent a2ae4dc commit 8ffaf0c
Show file tree
Hide file tree
Showing 7 changed files with 423 additions and 249 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ Auto parsing of arguments and options based on your command configuration:

### Dependencies

- Bash version 5 or superior is required.
- Bash version 5.2 or superior is required (might work with older versions but it is not guaranteed).
- From [GNU coreutils](https://www.gnu.org/software/coreutils/): it uses `rm`, `mv`, `mkdir`, `ln` (for the install).
- [fzf][fzf] is required for the interactive mode.
- [curl][curl] is only needed for the self-update command.

Expand Down Expand Up @@ -165,7 +166,6 @@ Please check the [CONTRIBUTING.md][contributing] documentation if you intend to
- Add full support for interactive mode.
- Replace fzf menu with equivalent pure bash menu.
- For dropdown with a set list of options, we can verify that the input value is one of the expected value.
- Setup github actions to automatically test Valet.
- Generate an autocompletion script for bash and zsh.
- Self-command to create a new command interactively.
- We can have fuzzy matching on options too; just make sure it is not ambiguous.
Expand All @@ -178,8 +178,9 @@ Please check the [CONTRIBUTING.md][contributing] documentation if you intend to
- Replace awk with bash.
- Provide an alternative bash function if diff is not found.
- Allow to separate commands from options/arguments with `--`.
- Fsfs: Display the number of lines and the current first line for the right panel.
- Fsfs: improve drawing time; connect the left and right panel with a T.
- Fsfs: Display the number of lines and the current first line for the right panel + nb items on the left pane.
- The installer script should embed the latest version at the time (modify just before a release) so it downloads the corresponding binary.
- Have a consistent look and feel for interactive functions.

[releases]: https://github.com/jcaillon/valet/releases
[latest-release]: https://github.com/jcaillon/valet/releases/latest
Expand Down
24 changes: 24 additions & 0 deletions tests.d/1100-self-config/results.approved.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,18 @@ VALET_CONFIG_COLOR_COMMAND="${VALET_CONFIG_COLOR_COMMAND:-}"
VALET_CONFIG_COLOR_ACTIVE_BUTTON="${VALET_CONFIG_COLOR_ACTIVE_BUTTON:-}"
VALET_CONFIG_COLOR_UNACTIVE_BUTTON="${VALET_CONFIG_COLOR_UNACTIVE_BUTTON:-}"
# Colors for fsfs
VALET_COLOR_FSFS_RESET_TEXT="${VALET_COLOR_FSFS_RESET_TEXT:-}"
VALET_COLOR_FSFS_STATIC="${VALET_COLOR_FSFS_STATIC:-}"
VALET_COLOR_FSFS_FOCUS="${VALET_COLOR_FSFS_FOCUS:-}"
VALET_COLOR_FSFS_FOCUS_RESET="${VALET_COLOR_FSFS_FOCUS_RESET:-}"
VALET_COLOR_FSFS_LETTER_HIGHLIGHT="${VALET_COLOR_FSFS_LETTER_HIGHLIGHT:-}"
VALET_COLOR_FSFS_LETTER_HIGHLIGHT_RESET="${VALET_COLOR_FSFS_LETTER_HIGHLIGHT_RESET:-}"
VALET_COLOR_FSFS_SELECTED_ITEM="${VALET_COLOR_FSFS_SELECTED_ITEM:-}"
VALET_COLOR_FSFS_SELECTED_ITEM_RESET="${VALET_COLOR_FSFS_SELECTED_ITEM_RESET:-}"
VALET_COLOR_FSFS_PROMPT_STRING="${VALET_COLOR_FSFS_PROMPT_STRING:-}"
VALET_COLOR_FSFS_PROMPT_STRING_RESET="${VALET_COLOR_FSFS_PROMPT_STRING_RESET:-}"
# -----------
# Other configs.
# -----------
Expand Down Expand Up @@ -346,6 +358,18 @@ VALET_CONFIG_COLOR_COMMAND="${VALET_CONFIG_COLOR_COMMAND:-}"
VALET_CONFIG_COLOR_ACTIVE_BUTTON="${VALET_CONFIG_COLOR_ACTIVE_BUTTON:-}"
VALET_CONFIG_COLOR_UNACTIVE_BUTTON="${VALET_CONFIG_COLOR_UNACTIVE_BUTTON:-}"
# Colors for fsfs
VALET_COLOR_FSFS_RESET_TEXT="${VALET_COLOR_FSFS_RESET_TEXT:-}"
VALET_COLOR_FSFS_STATIC="${VALET_COLOR_FSFS_STATIC:-}"
VALET_COLOR_FSFS_FOCUS="${VALET_COLOR_FSFS_FOCUS:-}"
VALET_COLOR_FSFS_FOCUS_RESET="${VALET_COLOR_FSFS_FOCUS_RESET:-}"
VALET_COLOR_FSFS_LETTER_HIGHLIGHT="${VALET_COLOR_FSFS_LETTER_HIGHLIGHT:-}"
VALET_COLOR_FSFS_LETTER_HIGHLIGHT_RESET="${VALET_COLOR_FSFS_LETTER_HIGHLIGHT_RESET:-}"
VALET_COLOR_FSFS_SELECTED_ITEM="${VALET_COLOR_FSFS_SELECTED_ITEM:-}"
VALET_COLOR_FSFS_SELECTED_ITEM_RESET="${VALET_COLOR_FSFS_SELECTED_ITEM_RESET:-}"
VALET_COLOR_FSFS_PROMPT_STRING="${VALET_COLOR_FSFS_PROMPT_STRING:-}"
VALET_COLOR_FSFS_PROMPT_STRING_RESET="${VALET_COLOR_FSFS_PROMPT_STRING_RESET:-}"
# -----------
# Other configs.
# -----------
Expand Down
1 change: 1 addition & 0 deletions tests.d/1300-valet-cli/results.approved.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ ABOUT
- 1+: an error occured
⌜Create your own commands:⌝
You can create your own commands and have them available in valet, please check https://github.com/jcaillon/valet/blob/main/docs/create-new-command.md or the examples under
examples.d to do so.
Valet looks for commands in the valet user directory, which default to ~/.valet.d and can be overwritten using an environment variable (see below).
Expand Down
12 changes: 12 additions & 0 deletions valet.d/commands.d/self-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,18 @@ VALET_CONFIG_COLOR_COMMAND=\"\${VALET_CONFIG_COLOR_COMMAND:-${EXPORTED_VALET_CON
VALET_CONFIG_COLOR_ACTIVE_BUTTON=\"\${VALET_CONFIG_COLOR_ACTIVE_BUTTON:-${EXPORTED_VALET_CONFIG_COLOR_ACTIVE_BUTTON:-}}\"
VALET_CONFIG_COLOR_UNACTIVE_BUTTON=\"\${VALET_CONFIG_COLOR_UNACTIVE_BUTTON:-${EXPORTED_VALET_CONFIG_COLOR_UNACTIVE_BUTTON:-}}\"
# Colors for fsfs
VALET_COLOR_FSFS_RESET_TEXT=\"\${VALET_COLOR_FSFS_RESET_TEXT:-${EXPORTED_VALET_COLOR_FSFS_RESET_TEXT:-}}\"
VALET_COLOR_FSFS_STATIC=\"\${VALET_COLOR_FSFS_STATIC:-${EXPORTED_VALET_COLOR_FSFS_STATIC:-}}\"
VALET_COLOR_FSFS_FOCUS=\"\${VALET_COLOR_FSFS_FOCUS:-${EXPORTED_VALET_COLOR_FSFS_FOCUS:-}}\"
VALET_COLOR_FSFS_FOCUS_RESET=\"\${VALET_COLOR_FSFS_FOCUS_RESET:-${EXPORTED_VALET_COLOR_FSFS_FOCUS_RESET:-}}\"
VALET_COLOR_FSFS_LETTER_HIGHLIGHT=\"\${VALET_COLOR_FSFS_LETTER_HIGHLIGHT:-${EXPORTED_VALET_COLOR_FSFS_LETTER_HIGHLIGHT:-}}\"
VALET_COLOR_FSFS_LETTER_HIGHLIGHT_RESET=\"\${VALET_COLOR_FSFS_LETTER_HIGHLIGHT_RESET:-${EXPORTED_VALET_COLOR_FSFS_LETTER_HIGHLIGHT_RESET:-}}\"
VALET_COLOR_FSFS_SELECTED_ITEM=\"\${VALET_COLOR_FSFS_SELECTED_ITEM:-${EXPORTED_VALET_COLOR_FSFS_SELECTED_ITEM:-}}\"
VALET_COLOR_FSFS_SELECTED_ITEM_RESET=\"\${VALET_COLOR_FSFS_SELECTED_ITEM_RESET:-${EXPORTED_VALET_COLOR_FSFS_SELECTED_ITEM_RESET:-}}\"
VALET_COLOR_FSFS_PROMPT_STRING=\"\${VALET_COLOR_FSFS_PROMPT_STRING:-${EXPORTED_VALET_COLOR_FSFS_PROMPT_STRING:-}}\"
VALET_COLOR_FSFS_PROMPT_STRING_RESET=\"\${VALET_COLOR_FSFS_PROMPT_STRING_RESET:-${EXPORTED_VALET_COLOR_FSFS_PROMPT_STRING_RESET:-}}\"
# -----------
# Other configs.
# -----------
Expand Down
Loading

0 comments on commit 8ffaf0c

Please sign in to comment.