-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathuser_profile.ps1
More file actions
48 lines (41 loc) · 1.14 KB
/
user_profile.ps1
File metadata and controls
48 lines (41 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Use this file to run your own startup commands
# See https://github.com/cmderdev/cmder/tree/master/config
## Prompt Customization
<#
.SYNTAX
<PrePrompt><CMDER DEFAULT>
λ <PostPrompt> <repl input>
.EXAMPLE
<PrePrompt>N:\Documents\src\cmder [master]
λ <PostPrompt> |
#>
[ScriptBlock]$PrePrompt = {
}
# Replace the cmder prompt entirely with this.
# [ScriptBlock]$CmderPrompt = {}
[ScriptBlock]$PostPrompt = {
}
## Add important EXE to $PATH
Write-Host "[+] Setting environment variables..." -NoNewline
cd ..
$env:PATH += ";$pwd;"
Get-ChildItem -Path "." -Include "*.exe" -Recurse -File -Force -ErrorAction SilentlyContinue | ForEach-Object -Process {
if ($_.FullName -like "*java.exe") {
$x = $_.Directory.Parent.FullName
$env:JAVA_HOME = $x
$x = $_.DirectoryName
$env:PATH = ";$x;" + $env:PATH
}
if ($_.FullName -like "*python.exe") {
$x = $_.DirectoryName
$env:PYTHONHOME = $x
$env:PATH = ";$x;" + $env:PATH
}
if ($_.FullName -like "*pip.exe") {
$x = $_.DirectoryName
$env:PATH = ";$x;" + $env:PATH
}
}
Write-Host "OK"
Remove-Item alias:curl
Remove-Item alias:wget