Open
Conversation
- fix `get-(app|font)` `--(need|which)` handling - add `--first` and `--need` handling to all `is-fs` commands, which required argument parsing, which eventually required a new `is-fs-operation.bash` source file which simplified the handling and allowed better and specific error handling without risk of parallel overwrites - also fix their help output, it is now consistent
first half now has correct and modern conventions second half still needs work updated terminology for old resources as well from `past references` to `other reading` moved `replace-inlind.md` from `bash` to `scripting` as it is applicable to any shell
This deprecates `echo-if-(directory|executable|file|path|present)` as they can now just be `is-(directory|executable|file|path|present) --echo --optional` which supports more options, albeit no longer supporting stdin inputs, however, for that, `echo-eval` could be used. `is-fs(-operation).bash` changes: - `__is_fs__options`, `__is_fs__invoke` now require flags instead of arguments - added aliases for the `__iterate` usage of `--require=` instead of `--need=` - fix `any` behaviour, before it acted as `first`, which isn't what we want when used with `--echo` - there is a `--no-echo` option for `is_fs__options` for `fs-path` - `fs-path` still needs to implement `--need` and `--first`
this also changes `is-fs.bash` to support `--verbose` on `--optional`
rename them to no longer require the `__` prefix for safety functions
/ref 8093ff0 fixes: - bash <=4 error due to subshell requiring `() (` - empty paths not being reported changes: - 22 errors are now reported linting
/ref b036a0d 22 errors are now always reported, so update tests accordingly to ignore stderr
/ref e167633 old code wasn't ported over in this file
- `is-match`: simpler arg parsing for this deprecated command
- `bash.bash`, `dorothy-internals`:
- add `__case_insensitive_compare`, `__case_insensitive_compare_pattern`, and `__case_insensitive_compare_glob`
- eval assignment failures now return 104
- `__case` renamed to `__transform` and simplified case args
- `__iterate`, `__unique`, `echo-unique` simplified case args and handling; now ignoring and lowercase are distinct operations as they should be
- add new `__filter` for using `__iterate` to filter
- add new `echo-filter` to expose `__filter` as a command
- `dorothy-warnings`: added `crash` action that will be used to hard deprecate long-term deprecations
- `expand-path(.zsh)` simplified code to make its operation clearer
- `get-app`: support case sensitive file systems, support flatpak names and ids, support .exe bins
- `setup-util-(1password|beeper|firefox|ghostty|github-desktop-plus|legcord|obs|ptyxis|vivaldi|vscode)` better app detection
- `errors.md` add new usage of exit status 90
Still work to do regarding consistency of `get-app`, `get-font`, `is-needle`, `is-fs`, `__iterate`
/ref befefb0 also add `__is_stdinargs_option_or_argument` to make filtering out arguments easier, used by `echo-filter`
/ref befefb0 this is so they can eventually be removed, preventing autocompletes from recommending the deprecated functions
also use the `__case_insensitive_compare` functions where applicable
as they don't support them, unless we add support by downloading it ourself - which may be what I'll do later after evaluation
also make sure r64 is last architecture
new command to use a regular expression to rename/move paths
/ref 264076e add `__case_insensitive_compare_contains`
Goal is merging `get-app`, `get-font`, `setup-bin`, `setup-utils`, into `setup-util`, `util.bash` `setup-bin` gets moved into the individual installers `setup-util --source=...` now `setup-util --transpose=...` `setup-util-croc` had incorrect cli `setup-util-neovim` now can detect its app `setup-util-nerd-fonts` fix extraction add `setup-util-super-productivity`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
still WIP, many commits still incoming