Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@balupton
Copy link
Member

@balupton balupton commented Feb 6, 2025

WIP

Closes:

May close:

Improves:

Discards old implementation of:

Todos:

Current batch todos, in any order:

  • merge my other WIP changes with the dev branch
  • new setup-shell flow
    • add login shell detection
    • make sure there is a cannot configure nu if nu not installed check
    • make sure that uninstallations in the setup-util-$shell flow remove uninstalled login shell, without endless recursion - I've added an exclude option, however need to finish implementing it
    • need to make sure that when unsetting a login shell, we use the next preference or prompt
    • need to implement the configuration saving
    • make use_shells empty by default, as otherwise everything is selected for login shell
  • auto-elevation
    • config-helper
    • echo-wait
    • echo-file
    • new is-touchable
    • --sudo flag to --elevate in all relevant locations
  • eval-helper and sudo-helper should be merged, or need a new eval-target command, to avoid conflating stderr output in no-tty mode (achieved by new __do function)
    • implement and test and cleanup new __do and __try functions
    • update Dorothy tests action for new semaphore location
  • echo-wait cleanup
  • get-installer to use a json file, so it can run on bash v3 which will fix dorothy-config failing on old bash versions.
  • sudo --stdin flag when needed
  • don't write theme fallback to cache
  • move styles.bash env vars preset to setup-environment-commands
  • test new get-terminal-theme on WSL
  • merge and release
  • figure out why the choose error happens if no git remote, as it should have thrown before calling choose - this could be the bash bug manifesting itself, or could be a bug in prior try versions now fixed
  • update outdated bash docs
  • experiment with custom tty device file when in no-tty so stderr is not filled up
  • complete cache expiry unification for get-terminal-theme and setup-environment-commands, for now live with the bug that is introduced where one must manually clear the terminal theme cache

/ref https://github.com/bevry/dorothy/actions/runs/18567569750/job/52932811944#step:4:400

this was the issue:

```
+ /Users/balupton/.local/share/dorothy/sources/bash.bash [154] [__command_required] [2]    	get-installer --first-success --invoke --quiet -- ''
+ /Users/balupton/.local/share/dorothy/sources/bash.bash [156] [__command_required] [2]    	for COMMAND_REQUIRED__command in "${COMMAND_REQUIRED__commands[@]}"
+ /Users/balupton/.local/share/dorothy/sources/bash.bash [157] [__command_required] [2]    	__command_exists -- ''
+ /Users/balupton/.local/share/dorothy/sources/bash.bash [95] [__command_exists] [2]    	[[ -- == \-\- ]]
+ /Users/balupton/.local/share/dorothy/sources/bash.bash [96] [__command_exists] [2]    	shift
+ /Users/balupton/.local/share/dorothy/sources/bash.bash [98] [__command_exists] [2]    	__affirm_length_defined 1 command
+ /Users/balupton/.local/share/dorothy/sources/bash.bash [1441] [__affirm_length_defined] [2]    	[[ 2 -ne 1 ]]
+ /Users/balupton/.local/share/dorothy/sources/bash.bash [1441] [__affirm_length_defined] [2]    	[[ 2 -ne 2 ]]
+ /Users/balupton/.local/share/dorothy/sources/bash.bash [1446] [__affirm_length_defined] [2]    	[[ 1 =~ ^[0-9]+$ ]]
+ /Users/balupton/.local/share/dorothy/sources/bash.bash [1450] [__affirm_length_defined] [2]    	[[ 1 -eq 0 ]]
+ /Users/balupton/.local/share/dorothy/sources/bash.bash [100] [__command_exists] [2]    	local COMMAND_EXISTS__command
+ /Users/balupton/.local/share/dorothy/sources/bash.bash [101] [__command_exists] [2]    	for COMMAND_EXISTS__command in "$@"
+ /Users/balupton/.local/share/dorothy/sources/bash.bash [102] [__command_exists] [2]    	[[ '' == brew ]]
+ /Users/balupton/.local/share/dorothy/sources/bash.bash [109] [__command_exists] [2]    	type -P ''
+ /Users/balupton/.local/share/dorothy/sources/bash.bash [112] [__command_exists] [2]    	return 1
+ /Users/balupton/.local/share/dorothy/sources/bash.bash [165] [__command_required] [2]    	return 104
```

this also fixes wraps not showing on --verbose
wget1 is now being installed, but failing to detect, as `wget_binary` was not being updated to `wget1`

https://github.com/bevry/dorothy/actions/runs/18568507438/job/52936078431#step:4:422
- fs-temp, *:
    - use `TMPDIR` instead of `XDG_CACHE_HOME` by default, to prevent SSD wear
- fs-temp:
    - support other types as well
    - return root if no `--file` nor `--directory`
    - no longer begin with `dorothy` as initial directory
- `bash.bash:__print_help`
    - support error as arguments
it is 100x more performant than subshell process substitution `="$(printf ...)"`
especially around assocative arrays
the cask is no longer available
prep for eventual merge in `media-helper`
perhaps it should be re-added, however for now, workaround
update `echo-math` for `--rounding`, `--decimals`, `--trim`, and better debugging, also fix `fltexpr` failing when 0 is the result
fix double `in in <duration>`

add tests

eval-helper: fix a subsequent `--` not being respected correctly

/ref d3a11a2
- `fs-{copy,link,move,remove}`: styled docs
- `fs-copy`: add `--backup`/`--quiet`, better default handling, fix rsync inserting a directory into a directory
- `fs-move`: prep new args, and call `fs-copy` on dir conflicts
- now delegates to the local dorothy if invoked remotely to prevent conflicts within commands
- more streamlined detection and handling of dorothy and user configuration directories
- create/update the repository in the existing/desired location, then migrate if necessary - prevents a `fs-move --merge` (and thus `rsync`) copy requirement
- trunk: upgrade cspell
- fs-type: alma has same output as opensuse
- setup-util-mediainfo: support more distros
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants