At first, you need to execute the below command in Windows Powershell.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Create %USERPROFILE%\.ssh\config
( $env:USERPROFILE\.ssh\config
in the case of PowerShell ) as follows:
Include */config
Host *
ServerAliveInterval 60
ServerAliveCountMax 5
AddKeysToAgent yes
IdentitiesOnly yes
TCPKeepAlive yes
Download ssh key file under %USERPROFILE%\.ssh
, then save the following configuration as %USERPROFILE%\.ssh\<github_username>\config
( $env:USERPROFILE\.ssh\<github_username>\config
in the case of PowerShell)
Host <github_username>.github.com
HostName github.com
IdentityFile ~/.ssh/<identyty_filename>
User git
Execute wsl --install -d Ubuntu
Execute the following commands.
- as Admin
.\install_via_winget.ps1
.\install_via_chocolatey.ps1
- as Normal User
.\install_via_scoop.ps1
Execute .\set_env_var_for_cmd.ps1
.
Execute as admin .\create_powershell_prompt_symlink.ps1
.
Add the following block to %USERPROFILE%\.gitconfig
( $env:USERPROFILE\.gitconfig
in the case of PowerShell ).
[user]
email = <mail address>
name = <your name>
[ghq]
root = C:/ws/ghq/default
[ghq "https://github.com/<user_name>"]
root = C:/ws/ghq/<user_name>
[url "git@<ssh_config_host_alias>:<user_name>"]
insteadOf = https://github.com/<user_name>
[url "git@<ssh_config_host_alias>:<user_name>"]
insteadOf = [email protected]:<user_name>
[includeIf "gitdir/i:C:/ws/ghq/<user_name>/**"]
path = C:/ws/ghq/<user_name>/.gitconfig
add C:\ws\ghq\<user_name>\.gitconfig
[user]
email = <mail address>
name = <your name>
Execute as admin .\create_ghq-peco_symlink.ps1
.
And paste the following statement on %USERPROFILE%\scoop\apps\cmder-full\current\config\user_aliases.cmd
gp=C:\ws\scripts\ghq-peco.bat
https://github.com/cmderdev/cmder/wiki/Customization#prompt-symbol
-
%USERPROFILE%\scoop\apps\cmder-full\current\config\cmder_prompt_config.lua
- line 22
prompt_lambSymbol = "$"
- line 22
-
If we want to change the prompt with variables, we need to configure
%USERPROFILE%\scoop\apps\cmder-full\current\config\cmder_prompt_config.lua
to add code blocks as follows:-
https://chrisant996.github.io/clink/clink.html#customizing-the-prompt
--- cyan_color = "\x1b[36;1m" local my_custom_prompt = clink.promptfilter(999) function my_custom_prompt:filter(prompt) local base_prompt = cwd_color..os.getcwd()..clean_color.." ("..os.date("%Y/%m/%d %H:%M:%S")..")" local line = io.popen("git branch --show-current 2>nul"):read("*a") local branch = line:match("(.+)\n") local return_prompt = base_prompt if branch then return_prompt = return_prompt.." "..cyan_color.."["..branch.."]" end return return_prompt..clean_color.."\n> " end
-
https://github.com/cmderdev/cmder/wiki/Customization#powershell
-
Powerline supported fons(my favorites):
- Roboto Mono for Powerline
- Inconsolata-g for Powerline
-
Oh-My-Posh
- Theme(my favorites):
- honukai
- slimfat
- wopian
- ys
- Theme(my favorites):