Skip to content
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

FEATURE: Edit-Profile function #88

Open
pa-0 opened this issue Jun 25, 2024 · 0 comments
Open

FEATURE: Edit-Profile function #88

pa-0 opened this issue Jun 25, 2024 · 0 comments

Comments

@pa-0
Copy link
Contributor

pa-0 commented Jun 25, 2024

This is more just a UX suggestion for everyone using your $PROFILE script. I have already implemented this in my own 'dotfiles' so just thought I'd share because I think it's pretty convenient:

For anyone who uses a Profile.ps1 for their own custom settings (in addition to syncing with the $PROFILE you offer on this repo), this helps preventing me from mistakenly adding any customizations to the 'main' $PROFILE script (since any of those changes will ultimately get overwritten when it syncs up with GitHub. It's also handy in that any changes I make are also synced to GitHub allowing me to use it on different machines.

In my fork to your repo, I've added this function:

function Edit-Profile { 
    start microsoft-edge:https://github.com/USERNAME/REPO/edit/main/Profile.ps1 
}
Set-Alias -Name ep -Value Edit-Profile

Note "edit" in the URL path. Typing "ep" or Edit-Profile in PowerShell automatically opens an editable version of Profile.ps1 in the browser.

I've added a line to your Update-Profile function so that it runs a check against the Profile.ps1 linked in the Edit-Profile function above so it syncs my custom file in addition to your main $PROFILE script.

I can make my changes there, knowing that it will sync across all my devices and avoiding potentially making those changes in the wrong script, e.g., the file opened when running the command code $PROFILE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant