Last active
April 5, 2024 06:35
-
-
Save motebaya/77da69936621d4274caa30d385b1d100 to your computer and use it in GitHub Desktop.
personal windows powershell config
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
# theme | |
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH/craver.omp.json" | Invoke-Expression | |
# aliases | |
New-Alias py python310 | |
New-Alias rb ruby | |
# Omp history | |
Set-PSReadLineOption -PredictionSource History | |
Set-PSReadLineOption -PredictionViewStyle ListView | |
# icons dirs | |
Import-Module Terminal-Icons | |
# i prefer using the terminal and controlling all commands without needing administrator | |
# access like in Linux. RUBY and GIT don't get access to USERPROFILE when i install them, | |
# so i need to move their default ENV variables. maybe i'll always apply this in other apps too. | |
# git | |
$env:GIT_CONFIG_GLOBAL="D:\Software\Git\.gitconfig" | |
# ruby | |
$env:GEM_HOME = "D:/Software/RubyWindows/.gem" | |
$env:GEM_PATH = "$env:GEM_HOME;D:\Software\RubyWindows\3.3.0-1\lib\ruby\gems\3.3.0" | |
$env:GEM_SPEC_CACHE = "D:\Software\RubyWindows\.cache" | |
$env:GEMRC = "D:\Software\RubyWindows\.gem\.gemrc" | |
$env:XDG_CACHE_HOME="D:\Software\RubyWindows\.cache" | |
$env:RBENV_ROOT = "D:\Software\RubyWindows" | |
$env:IRB_HISTORY_PATH = "D:\Software\RubyWindows" | |
$env:IRBRC = "d:\Software\RubyWindows\.irbrc" | |
$env:BUNDLE_USER_CACHE = "D:\Software\RubyWindows\.bundle-cache" | |
# nano -> remove from env var, then set function to call nano path directly with custom rcfile too. | |
function nano { D:\Software\Nano\bin\nano.exe --rcfile 'D:\Software\Nano\.nanorc' $args } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i think need create symbolick for support regex / asterisk wildcard (
path\*.nanorc
). but itUSERPROFILE
not readable without admin.