The unpac monorepo manager self-hosting as a monorepo using unpac
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update distribution build system for pwsh (#214)

+13 -3
+9
vendor/opam/cmdliner/Makefile
··· 20 20 MANDIR=$(SHAREDIR)/man 21 21 BASHCOMPDIR=$(SHAREDIR)/bash-completion/completions 22 22 ZSHCOMPDIR=$(SHAREDIR)/zsh/site-functions 23 + PWSHCOMPDIR=$(SHAREDIR)/powershell 23 24 NATIVE=$(shell ocamlopt -version > /dev/null 2>&1 && echo true) 24 25 # EXT_LIB by default value of OCaml's Makefile.config 25 26 # NATDYNLINK by default value of OCaml's Makefile.config ··· 75 76 $(TOOL) tool-completion bash cmdliner > $(TOOLBDIR)/bash-cmdliner.sh 76 77 $(TOOL) generic-completion zsh > $(TOOLBDIR)/zsh-completion.sh 77 78 $(TOOL) tool-completion zsh cmdliner > $(TOOLBDIR)/zsh-cmdliner.sh 79 + $(TOOL) generic-completion pwsh > $(TOOLBDIR)/pwsh-completion.ps1 80 + $(TOOL) tool-completion pwsh cmdliner > $(TOOLBDIR)/pwsh-cmdliner.ps1 78 81 79 82 build-man: $(BUILD-EXE) 80 83 $(TOOL) install tool-manpages $(TOOLBDIR)/cmdliner $(TOOLBDIR)/man ··· 120 123 $(INSTALL) -m 644 $(TOOLBDIR)/zsh-completion.sh \ 121 124 "$(ZSHCOMPDIR)/_cmdliner_generic" 122 125 $(INSTALL) -m 644 $(TOOLBDIR)/zsh-cmdliner.sh "$(ZSHCOMPDIR)/_cmdliner" 126 + $(INSTALL) -d "$(PWSHCOMPDIR)" 127 + $(INSTALL) -m 644 $(TOOLBDIR)/pwsh-completion.ps1 \ 128 + "$(PWSHCOMPDIR)/cmdliner_generic_completion.ps1" 129 + $(INSTALL) -m 644 $(TOOLBDIR)/pwsh-cmdliner.ps1 \ 130 + "$(PWSHCOMPDIR)/cmdliner_completion.ps1" 131 + 123 132 124 133 .PHONY: all install install-doc clean build-byte build-native \ 125 134 build-native-dynlink build-byte-exe build-native-exe build-completions \
+3 -2
vendor/opam/cmdliner/doc/cli.mld
··· 307 307 308 308 {@ps1[ 309 309 # first, load the generic cmdliner completion function 310 - . "$(opam var share)/powershell/cmdliner-generic.ps1" 310 + . "$(opam var share)/powershell/cmdliner_generic_completion.ps1" 311 311 # then, register each tool you want completions for 312 312 # for example: 313 313 . "$(opam var share)/powershell/cmdliner_completion.ps1" ··· 322 322 323 323 With this setup, if you are using a cmdliner based tool named 324 324 [thetool] that did not {{!install_tool_completion}install} a completion 325 - definition. You can always do it yourself by invoking: 325 + definition. You can always do it yourself by invoking the result of 326 + [cmdliner tool-completion pwsh thetool]: 326 327 327 328 {@ps1[ 328 329 Register-ArgumentCompleter -Native -CommandName thetool -ScriptBlock $Global:_cmdliner_generic
+1 -1
vendor/opam/cmdliner/src/tool/cmdliner_main.ml
··· 317 317 module Pwsh = struct 318 318 let name = "pwsh" 319 319 let sharedir = "powershell" 320 - let generic_script_name = "_cmdliner_generic.ps1" 320 + let generic_script_name = "cmdliner_generic_completion.ps1" 321 321 let generic_completion = 322 322 Cmdliner_data.pwsh_generic_completion "_cmdliner_generic" 323 323