Created
August 20, 2021 06:48
-
-
Save caphosra/e15108ad59ba66dc903d1c02ae1cf5e2 to your computer and use it in GitHub Desktop.
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
| # Use UTF-8 as a charset. | |
| [System.Console]::OutputEncoding = [System.Text.Encoding]::GetEncoding("utf-8") | |
| [System.Console]::InputEncoding = [System.Text.Encoding]::GetEncoding("utf-8") | |
| $env:LESSCHARSET = "utf-8" | |
| # Change the theme. | |
| Set-PoshPrompt -Theme powerlevel10k_modern | |
| If ($IsWindows) { | |
| # Create a new command which is equivalent to the "which" keyword in Linux. | |
| function Which-ExecuteFile { | |
| # Just execute "where.exe" with arguments given. | |
| # Why I don't call "where.exe" directly is because the word, "where" is already reserved by default in Powershell. | |
| where.exe $args | |
| } | |
| # Create "which" alias. | |
| Set-Alias -Name which -Value Which-ExecuteFile | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment