-
Notifications
You must be signed in to change notification settings - Fork 287
docs: 📝 Update wiki powershell-snippet #1542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Update powershell-snippet in wiki to play nice with zoxide, yazi etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Let me know what you think of this feedback.
BTW, I don't have |
Set global encoding confing for zoxide and simplify Set-Location function
I ran a few variations of the experiment so basically if I do This leads me to believe this silencing behavior might have something to do with zoxide's command when changing directories.
|
Edit: I played around with zoxide's script a bit and fixed both issues
onefetch setup
I believe they silence the output because -PassThru they use returns a dictionary which they don't really wanna log, so maybe a sort of configurable option there would be nice So to summarize the current stuff not printing is more of a zoxide issue 😔 and the this pr fixes the path not changing issue due to other required params not being propagated through the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe they silence the output because -PassThru they use returns a dictionary which they don't really wanna log, so maybe a sort of configurable option there would be nice
Without looking more into it, I'm not really sure why zoxide is using -PassThru
at all. If they don't want output, simply excluding -PassThru
can achieve that. Discarding the output of -PassThru
is like doing some-tool --verbose > /dev/null
😅
Maybe -PassThru
behaves differently on older versions of PowerShell 🤷
🤔 Also, as a workaround when |
I don't think it would be a good idea to redirect onefetch's output to stderr in case of powershell onefetch | Write-Error
onefetch | Write-Error : TSXTSXTSXTSXTSXTSXTSXTSXTSXTSXTSXTSXTSX FallenDeity ~ git version 2.48.1.windows.1
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException
onefetch | Write-Error : TSXTSXTSXTSXTSXTSXTSXTSXTSXTSXTSXTSXTSX ------------------------------------------
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException wouldnt want this 😭, also afaik piping to stderr might mess with onefetch styles since a lot of terminals/or terminal config frameworks apply custom ansi styles to error text for theming |
Alright, that makes sense, then I think your PR is good as it is 👍 |
@o2sh This will need an admin to merge because the required CI jobs won't run with the ignored paths. |
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [o2sh/onefetch](https://github.com/o2sh/onefetch) | minor | `2.23.1` -> `2.24.0` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>o2sh/onefetch (o2sh/onefetch)</summary> ### [`v2.24.0`](https://github.com/o2sh/onefetch/blob/HEAD/CHANGELOG.md#2240-2025-04-12) [Compare Source](o2sh/onefetch@2.23.1...2.24.0) ##### New Features - add language support for Lean by [@​foxyseta](https://github.com/foxyseta) in o2sh/onefetch#1509 - add language support for Typst by [@​foxyseta](https://github.com/foxyseta) in o2sh/onefetch#1508 - add language support for Razor by [@​SrS2225a](https://github.com/SrS2225a) in o2sh/onefetch#1521 ##### Chores - more idiomatic way to fetch HEAD refs by [@​o2sh](https://github.com/o2sh) in o2sh/onefetch#1515 - more idiomatic way to fetch repository remote URL by [@​o2sh](https://github.com/o2sh) in o2sh/onefetch#1516 - update holyc language logo by [@​o2sh](https://github.com/o2sh) in o2sh/onefetch#1543 - update wiki powershell-snippet by [@​FallenDeity](https://github.com/FallenDeity) in o2sh/onefetch#1542 - add nix local setup [@​Sk7Str1p3](https://github.com/Sk7Str1p3) in o2sh/onefetch#1549 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC4xMS4yIiwidXBkYXRlZEluVmVyIjoiNDAuMTEuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
Update powershell-snippet in wiki to play nice with zoxide, yazi etc
With reference to #1467 @spenserblack