-
Notifications
You must be signed in to change notification settings - Fork 0
/
Microsoft.PowerShell_profile.ps1
110 lines (96 loc) · 1.42 KB
/
Microsoft.PowerShell_profile.ps1
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
if(-not $env:path.Split(';').Contains('.'))
{
$env:path += ";."
}
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH/avit.omp.json" | Invoke-Expression
function mkdir_cd
{
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
$Path
)
New-Item -Path $Path -ItemType Directory
Set-Location -Path $Path
}
function mkdir_cd_cls
{
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
$Path
)
New-Item -Path $Path -ItemType Directory
Set-Location -Path $Path
Clear-Host
}
function git_status()
{
git status
}
function ex
{
exit
}
function cd1
{
Set-Location ..\
}
function cd2
{
Set-Location ..\..\
}
function cd3
{
Set-Location ..\..\..\
}
function cdhome
{
Set-Location ~
}
function cddotfiles
{
Set-Location ~\dotfiles
}
function clsls
{
Clear-Host
Get-ChildItem
}
function cdclsls
{
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
$Path
)
Set-Location -Path $Path
Clear-Host
Get-ChildItem
}
function clear
{
Clear-Host
}
function dotfiles_gitpull
{
Set-Location ~\dotfiles
git pull
}
Set-Alias csl clear
Set-Alias cl clear
Set-Alias n nvim
Set-Alias v vim
Set-Alias gs git_status
Set-Alias mcd mkdir_cd
Set-Alias mccd mkdir_cd_cls
Set-Alias :q ex
Set-Alias q: ex
Set-Alias ... cd1
Set-Alias .... cd2
Set-Alias ..... cd3
Set-Alias ~ cdhome
Set-Alias dot cddotfiles
Set-Alias ccls clsls
Set-Alias cdls cdclsls
Set-Alias dgp dotfiles_gitpull