File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
custom-completions/windows Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ export module win {
2+
3+ # open in visual studio
4+ export def "open in vs-2022" [file : path ] {
5+ let file = ($file | path expand )
6+ let vs = ` C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.exe` # TODO: read loc from reg?
7+ run-external $vs /Edit $file
8+ }
9+
10+ def "nu-complete procs" [] { ps | select pid name | sort-by name | rename - c { pid : value , name: description } }
11+
12+ export def "windbg attach-to-process" [
13+ -- pid(-p) : int @" nu-complete procs" # process-id
14+ ] {
15+ let windbg = ' ~/AppData/Local/Microsoft/WindowsApps/WinDbgX.exe' # TODO: read loc from reg?
16+ run-external $windbg " -p" $pid
17+ }
18+
19+ # file version and signature viewer from file
20+ export def "read version" [file : path ] {
21+ ^ sigcheck - nobanner $file | lines | skip 1 | parse -- regex ' \s*(?<name>.+?):(?<value>.+)'
22+ }
23+
24+ # https://learn.microsoft.com/en-us/sysinternals/downloads/procdump#using-procdump
25+ #
26+ # Examples:
27+ # Install ProcDump as the (AeDebug) postmortem debugger:
28+ # procdump -ma -i c:\dumps
29+ #
30+ # Uninstall ProcDump as the (AeDebug) postmortem debugger:
31+ # procdump -u
32+ export extern "procdump" [ ... args : any ]
33+
34+ }
35+
You can’t perform that action at this time.
0 commit comments