-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_bashrc.cmd
More file actions
189 lines (161 loc) · 6.38 KB
/
_bashrc.cmd
File metadata and controls
189 lines (161 loc) · 6.38 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
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
@echo off
:: for /F will launch a new instance of cmd so we create a guard to prevent an infnite loop
if not defined FNM_AUTORUN_GUARD (
set "FNM_AUTORUN_GUARD=AutorunGuard"
FOR /f "tokens=*" %%z IN ('fnm env --use-on-cd') DO CALL %%z
)
:: Add git-utils, npm-utils, and python-utils to PATH for standalone batch files
set "PATH=%~dp0git-utils;%~dp0npm-utils;%~dp0python-utils;%PATH%"
:: =============================================================================
:: GIT ALIASES AND FUNCTIONS
:: =============================================================================
:: Basic Git Commands
doskey g=git $*
doskey ga=git add $*
doskey gc=git commit $*
doskey gca=git commit --amend $*
doskey gd=git diff $*
doskey gd0=git diff HEAD~0 $*
doskey gd1=git diff HEAD~1 $*
doskey gl=git log $*
doskey gcl=git clone $*
:: Git Status and Information
doskey gs=%~dp0git-utils\git-status.bat
doskey gu=%~dp0git-utils\git-update.bat
doskey gf=git fetch -p
doskey gft=git fetch --tags -f
:: Git Restore and Cleanup
doskey gr=git restore $*
doskey grr=git remote $*
doskey grrs=git remote -v show
doskey grs=git restore --staged $*
doskey gra=git restore --staged . ^&^& git restore .
doskey grA=%~dp0git-utils\git-restore-all.bat
:: Git Checkout and Branch Management
doskey gch=%~dp0git-utils\git-checkout.bat $*
doskey gb=git branch $*
doskey gt=git tag $*
doskey gbv=git branch -vv
doskey gbvr=git branch -vv -r
doskey gbc=git branch -vv ^| findstr "^\*" ^| for /f "tokens=2" %%b in ('more') do echo %%b
doskey gblg=git branch -vv ^| findstr "gone" ^| for /f "tokens=3" %%b in ('more') do echo %%b
doskey gbD=for /f "tokens=*" %%b in ('git branch -vv ^| findstr "gone" ^| for /f "tokens=3" %%c in ("%%b") do echo %%c') do git branch -D %%b
doskey gblb=git branch -vv ^| findstr "behind" ^| for /f "tokens=3" %%b in ('more') do echo %%b
:: Git Push and Pull Commands
doskey gpl=git pull $*
doskey gplo=git pull origin $*
doskey gph=git push $*
doskey gpho=git push -u origin $*
doskey gpht=git push --tags
doskey gphf=git push --force $*
:: Git Merge and Rebase Commands
doskey gm=git merge $*
doskey gma=git merge --abort
doskey grb=git rebase $*
doskey grbc=git rebase --continue
doskey grba=git rebase --abort
:: Git Cherry-pick Commands
doskey gcp=git cherry-pick $*
doskey gcpa=git cherry-pick --abort
doskey gcpc=git cherry-pick --continue
:: Git Stash Commands
doskey gst=git stash $*
doskey gsta=git stash apply $*
doskey gstp=git stash pop $*
doskey gstl=git stash list
doskey gsts=git stash show $*
doskey gstd=git stash drop $*
:: Git Worktree Commands
doskey gw=git worktree $*
doskey gwl=git worktree list
doskey gwa=git worktree add $*
doskey gwm=git worktree move $*
doskey gwr=git worktree remove $*
doskey gwp=git worktree prune
:: Git Remote Commands
doskey glsa=git ls-remote --refs $*
doskey glsb=git ls-remote --refs --heads $*
doskey gls=%~dp0git-utils\git-ls-remote-formatted.bat
doskey glst=git ls-remote --refs --tags $*
:: Git PR Commands
doskey gprl=git branch -vv ^| findstr "__PR-" ^| for /f "tokens=3" %%b in ('more') do echo %%b
doskey gprD=for /f "tokens=*" %%b in ('git branch -vv ^| findstr "__PR-" ^| for /f "tokens=3" %%c in ("%%b") do echo %%c') do git branch -D %%b
:: Complex Git Functions
doskey gbU=%~dp0git-utils\git-branch-update-all.bat
doskey gdn=%~dp0git-utils\git-diff-n.bat $*
doskey gwA=%~dp0git-utils\git-worktree-add.bat $*
doskey gwch=%~dp0git-utils\git-worktree-checkout.bat $*
doskey gpr=%~dp0git-utils\git-pull-request.bat $*
doskey gwA=%~dp0git-utils\git-worktree-add.bat $*
doskey gwch=%~dp0git-utils\git-worktree-checkout.bat $*
doskey gpr=%~dp0git-utils\git-pull-request.bat $*
:: =============================================================================
:: NPM ALIASES AND FUNCTIONS
:: =============================================================================
:: Basic NPM Commands
doskey n=npm $*
doskey ni=npm install $*
doskey nci=npm ci $*
doskey nun=npm uninstall $*
doskey nu=npm update $*
doskey nv=npm view $*
doskey nl=npm list $*
:: NPM Install Variants
doskey niw=npm install --no-workspaces $*
doskey nil=npm install --legacy-peer-deps $*
doskey nip=npm install --package-lock-only $*
doskey nii=npm install --package-lock-only --no-package-lock $*
doskey nis=npm install --save --save-exact $*
doskey niis=npm install --package-lock-only --no-package-lock --save --save-exact $*
doskey nig=npm install --ignore-scripts $*
doskey nif=npm install --foreground-scripts $*
:: NPM Audit Commands
doskey na=npm audit $*
doskey naf=npm audit fix $*
doskey nafl=npm audit fix --legacy-peer-deps $*
doskey nap=npm audit --production --audit-level=moderate $*
:: NPM Run Commands
doskey nr=npm run $*
doskey nrb=npm run build $*
doskey nrc=npm run compile $*
doskey nrl=npm run lint $*
doskey nrlf=npm run lint -- --fix $*
doskey nrs=npm run start $*
doskey nrw=npm run watch $*
doskey nrp=npm run package $*
:: NPM Test Commands
doskey ntu=npm run test:unit $*
doskey nti=%~dp0npm-utils\npm-test-integration.bat $*
doskey nup=npm run update:imperative $*
doskey ntii=%~dp0npm-utils\npm-test-integration-inband.bat $*
doskey ntsc=%~dp0npm-utils\npm-test-system-custom.bat
doskey nts=npm run test:system $*
doskey ntsi=%~dp0npm-utils\npm-test-system-inband.bat
:: NPM Utility Commands
doskey nrtc=npm run checkTestsCompile $*
doskey nsw=npm shrinkwrap $*
doskey nlb=npx lerna run build $*
:: NPM Complex Functions
doskey nrcb=%~dp0npm-utils\npm-clean-build.bat
doskey rmd=%~dp0npm-utils\npm-remove-dist.bat
doskey nib=%~dp0npm-utils\npm-install-build.bat
:: =============================================================================
:: PYTHON ALIASES AND FUNCTIONS
:: =============================================================================
:: Basic Python Commands
doskey p3=python3 $*
doskey python=p3 $*
doskey pyp=python3 -m pip $*
doskey pis=pip show $*
:: Python Install Commands
doskey pir=%~dp0python-utils\python-install-requirements.bat
doskey pirm=%~dp0python-utils\python-install-zowe.bat
doskey pyr=pip install -r requirements.txt $*
:: Python Environment Commands
doskey penv=%~dp0python-utils\python-env.bat $*
:: Python Test Commands
doskey tp=python3 test.py $*
doskey tpa=python3 app.py $*
doskey pyt=pytest -s $*
doskey tpu=%~dp0python-utils\python-test-unit.bat
doskey tpi=%~dp0python-utils\python-test-integration.bat