The current version of the configuration file has two functions:
- It changes the appearance of powershell prompt:
- Only name of the current directory is shown. E.g.
projects
instead ofC:\Users\username\username\projects
is displayed. - If the current directory is the home directory, the symbol "
~
" shown. E.g.~
instead ofusername
is displayed. - If the current directory is a git repository, the name of the active branch is displayed.
- Only name of the current directory is shown. E.g.
- It defines some useful commands and aliases:
mkv
command creates a new python virtual environment in directory ".\venv".vrun
command activates the environment in ".\venv" directory.
The inspiration of the project is oh-my-zsh project.
In order to use the configuration file on your system, you should place it at the location pointed by $profile
command in PowerShell.
$profile
The script "setup.ps1" will do exactly this. As alternative, the following command can be executed in PowerShell in the directory with the repository.
cp Microsoft.PowerShell_profile.ps1 $profile
All the changes will be applied to all new sessions in PowerShell.
The file provided can also be used as a starting point for your own configuration file. The author recommends to use The Windows PowerShell Integrated Scripting Environment (ISE) which can be launched via following command in PowerShell.
powershell_ise.exe