Custom configuration for my Bash setup. To set up, modify .bashrc as follows:
if [ -f ~/path/to/prompt.sh ]; then
source ~/path/to/prompt.sh
fi
PROMPT_COMMAND=__prompt_command # Func to gen PS1 after CMDs
if [ -f ~/path/to/alias.sh ]; then
. ~/path/to/alias.sh
fi
You can disable bell notification on tab-complete:
https://linuxconfig.org/turn-off-beep-bell-on-linux-terminal
Disable a terminal tab-completion bell by editing
/etc/inputrc
and add / replace line:
set bell-style none
Ensure Windows is up-to-date, then run from powershell wsl --install
.
Sets up Git through WSL.
https://github.com/andy-5/wslgit
Note, where you extract the release is where it is installed, so don't do in downloads.
https://www.microsoft.com/en-gb/p/windows-terminal/9n0dx20hk701?rtc=1&activetab=pivot:overviewtab
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Confirm
PowerShellGet\Install-Module posh-git -Scope CurrentUser -Force
Test it worked:
Import-Module posh-git
Prompt should be changed if inside a git repo. Now put the profile into $PROFILE
(probably C:\Users\Thomas\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
)