Skip to content

Commit

Permalink
♻️ hugh refacto of logs and wrap functions
Browse files Browse the repository at this point in the history
  • Loading branch information
jcaillon committed Jan 7, 2025
1 parent a8f4bcb commit 61e350b
Show file tree
Hide file tree
Showing 22 changed files with 2,042 additions and 889 deletions.
14 changes: 7 additions & 7 deletions commands.d/self-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -207,27 +207,27 @@ VALET_CONFIG_STRICT_MATCHING=\"\${VALET_CONFIG_STRICT_MATCHING:-${EXPORTED_VALET
# Useful in a CI environment where you want to disable all animations.
VALET_CONFIG_DISABLE_PROGRESS=\"\${VALET_CONFIG_DISABLE_PROGRESS:-${EXPORTED_VALET_CONFIG_DISABLE_PROGRESS:-}}\"
## -----------
## Log/output configuration
## -----------
# If true, will enable the icons (using nerd font).
VALET_CONFIG_ENABLE_NERDFONT_ICONS=\"\${VALET_CONFIG_ENABLE_NERDFONT_ICONS:-${EXPORTED_VALET_CONFIG_ENABLE_NERDFONT_ICONS:-}}\"
# If true, will forcibly enable the color output (otherwise we try to detect color support on start).
VALET_CONFIG_ENABLE_COLORS=\"\${VALET_CONFIG_ENABLE_COLORS:-${EXPORTED_VALET_CONFIG_ENABLE_COLORS:-}}\"
## -----------
## Log/output configuration
## -----------
# If true, will disable the text wrapping for logs.
VALET_CONFIG_DISABLE_LOG_WRAP=\"\${VALET_CONFIG_DISABLE_LOG_WRAP:-${EXPORTED_VALET_CONFIG_DISABLE_LOG_WRAP:-}}\"
VALET_CONFIG_LOG_DISABLE_WRAP=\"\${VALET_CONFIG_LOG_DISABLE_WRAP:-${EXPORTED_VALET_CONFIG_LOG_DISABLE_WRAP:-}}\"
# Sets the maximum width for the log output (used only when log wrapping is enabled).
VALET_CONFIG_LOG_COLUMNS=\"\${VALET_CONFIG_LOG_COLUMNS:-${EXPORTED_VALET_CONFIG_LOG_COLUMNS:-}}\"
# If true, will disable the time for logs.
VALET_CONFIG_DISABLE_LOG_TIME=\"\${VALET_CONFIG_DISABLE_LOG_TIME:-${EXPORTED_VALET_CONFIG_DISABLE_LOG_TIME:-}}\"
VALET_CONFIG_LOG_DISABLE_TIME=\"\${VALET_CONFIG_LOG_DISABLE_TIME:-${EXPORTED_VALET_CONFIG_LOG_DISABLE_TIME:-}}\"
# If true, will print a timestamp instead of simple time in the logs.
VALET_CONFIG_ENABLE_LOG_TIMESTAMP=\"\${VALET_CONFIG_ENABLE_LOG_TIMESTAMP:-${EXPORTED_VALET_CONFIG_ENABLE_LOG_TIMESTAMP:-}}\"
VALET_CONFIG_LOG_ENABLE_TIMESTAMP=\"\${VALET_CONFIG_LOG_ENABLE_TIMESTAMP:-${EXPORTED_VALET_CONFIG_LOG_ENABLE_TIMESTAMP:-}}\"
# The file descriptor to use for the logs (defaults to 2 to output to stderr).
VALET_CONFIG_LOG_FD=\"\${VALET_CONFIG_LOG_FD:-${EXPORTED_VALET_CONFIG_LOG_FD:-}}\"
Expand Down
6 changes: 3 additions & 3 deletions commands.d/self-test-utils
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,9 @@ function selfTestUtils_setEvalVariables() {
export VALET_CONFIG_ENABLE_COLORS=false
export VALET_CONFIG_ENABLE_NERDFONT_ICONS=false
export VALET_CONFIG_DISABLE_LOG_TIME=true
export VALET_CONFIG_DISABLE_LOG_WRAP=true
export VALET_CONFIG_ENABLE_LOG_TIMESTAMP=false
export VALET_CONFIG_LOG_DISABLE_TIME=true
export VALET_CONFIG_LOG_DISABLE_WRAP=true
export VALET_CONFIG_LOG_ENABLE_TIMESTAMP=false
export VALET_CONFIG_LOG_COLUMNS=9999
export VALET_CONFIG_ICON_ERROR=IE
Expand Down
4 changes: 2 additions & 2 deletions docs/content/docs/800.roadmap/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ url: /docs/roadmap

This page lists the features that I would like to implement in Valet. They come in addition to new features described in the [issues][valet-issues].

- Finish prompt and interactive functions: prompt user for multiline text. Prompt user for multi select.
- core::checkParseResults typo...
- Add a full screen view with the keyboard shortcuts in edit mode (new interactive::showFullScreenHelp ?).
- In benchmark, with debug mode on, we can compute the time spent on each line of a function (+ try to improve the fuzzy filter sort).
- add snippets for the Ansi codes. Add snippets on the global variables.
- check usage of array::fuzzyFilterSort and add back the colors.
- Demo with ascii cinema: https://asciinema.org.
- For all the optional arguments of exported functions, allow to set them using a global variable `_OPTION_*` in addition to the positional argument. Add this in the documentation about functions.
- Finish prompt and interactive functions: prompt user for multiline text. Prompt user for multi select.
- allow an array for options `--file 1 --file 2` -> `files=(1 2)` `--file <files*>`
- make `source` able to source multiple libraries that are called the same.
- add-test
Expand Down Expand Up @@ -43,6 +44,5 @@ This page lists the features that I would like to implement in Valet. They come
- handle shift + arrows to highlight text
- add a stack for kill/yank
- add a stack for undo/redo
- handle copy to prompt in one go

[valet-issues]: https://github.com/jcaillon/valet/issues
Loading

0 comments on commit 61e350b

Please sign in to comment.