我使用堆栈和hpackpackage.yaml文件来编译我的 haskell 项目。它具有由一个库支持的三个可执行文件。正如人们所期望的那样,可执行文件都定义了一个模块:Main
$ head -n1 app/*
==> app/Foo.hs <==
module Main where
==> app/Bar.hs <==
module Main where
==> app/Baz.hs <==
module Main where
Run Code Online (Sandbox Code Playgroud)
我用这个package.yaml看起来很相似(我)到了一个从链接官方文档的hpack(第三个)。
name: myproject
dependencies:
- base
library:
source-dirs: src
executables:
foo:
main: Foo.hs
source-dirs: app
dependencies: myproject
bar:
main: Bar.hs
source-dirs: app
dependencies: myproject
baz:
main: Baz.hs
source-dirs: app
dependencies: myproject
Run Code Online (Sandbox Code Playgroud)
但是当我stack build收到错误时,模块名称与文件名不匹配:
Building all executables for `myproject' once. After a …Run Code Online (Sandbox Code Playgroud) 我正在为我编写的 shell 脚本/程序编写 zsh 补全函数。在完成过程中的某个时刻,我想使用另一个命令的完成功能来处理完成的其余部分。
如何找出特定命令的完成函数的调用方式?如何查找compdefshell 中现有的分配?
我的程序换行nvim,并且我的 shell 中没有_nvim我猜想的函数是完成函数。所以我假设使用的完成函数nvim实际上是_vim,但这个问题更一般,以便学习。