如何使用 Homebrew 在 OS X 上为命令行安装 Basex?

How to install Basex for command line on OS X using Homebrew?

我正在尝试在 OS X:

上使用 Homebrew 安装 BaseX
$ brew cask install basex
==> We need to make Caskroom for the first time at /opt/homebrew-cask/Caskroom
==> We'll set permissions properly so we won't need sudo in the future
Password:
==> Downloading http://files.basex.org/releases/8.1.1/BaseX811.app.tar.bz2
######################################################################## 100.0%
==> Symlinking App 'BaseX.app' to '/Users/user/Applications/BaseX.app'
  basex staged at '/opt/homebrew-cask/Caskroom/basex/8.1.1' (148 files, 153M)
$ basex
-bash: basex: command not found

从命令行运行它究竟需要做什么?

brew cask 将 GUI 应用程序安装到 /Applications,而不是命令行工具。如果你想安装命令行工具,运行 brew install basex(没有cask)。

也比较cask recipy安装应用

app 'BaseX.app'

使用 brew recipy 安装命令行工具并创建指向可执行文件的符号链接

libexec.install Dir["*"]
bin.install_symlink Dir["#{libexec}/bin/*"]

感受差异。