The generic repl
command-line tool can be installed as a brew
external command, after which it can be used as a regular brew
subcommand.
$ brew repl
"brew %s" >> update
...
"brew %s" >> outdated
...
"brew %s" >> info gh
...
"brew %s" >> upgrade
...
"brew %s" >> cleanup
...
"brew %s" >> ^D
$ _
The brew-repl
command is just a symlink to the generic repl
command-line tool and therefore requires that repl
is installed on your system first.
Install the latest version of the repl
script in a directory that is on your PATH
and ensure that it is executable:
REPL_INSTALL_DIR=/usr/local/bin
curl -s https://raw.githubusercontent.com/pvdb/repl/master/repl.rb -o "${REPL_INSTALL_DIR}/repl"
chmod 755 "${REPL_INSTALL_DIR}/repl"
In the same directory on your PATH
where repl
is installed, create a symlink named brew-repl
to the repl
script:
REPL_INSTALL_DIR=/usr/local/bin
ln -s "${REPL_INSTALL_DIR}/repl" "${REPL_INSTALL_DIR}/brew-repl"
This way you can run brew repl
without any changes to your system's $PATH
, but you can adjust REPL_INSTALL_DIR
to match your shell environment.
Once installed, a brew
REPL can be launched using brew repl
(or less commonly as brew-repl
).
Coming soon
brew commands | egrep '^[^ ]+$' > ${HOME}/.repl/brew
The default repl
completion directory is ${HOME}/.repl/
but can be overridden by setting the REPL_COMPLETION_DIR
environment variable (in your shell environment or else in $(HOME)/.replrc
).