33 lines
389 B
Bash
Executable File
33 lines
389 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
interpreters=()
|
|
|
|
add() {
|
|
local interp=$1
|
|
if command -v $interp &> /dev/null; then
|
|
interpreters+=($(where $interp))
|
|
fi
|
|
}
|
|
|
|
add ipython
|
|
add python
|
|
add cling
|
|
add lua
|
|
add luajit
|
|
add node
|
|
|
|
add bash
|
|
add zsh
|
|
add fish
|
|
|
|
interpreter=$(
|
|
echo "${interpreters[@]}" | tr ' ' '\n' |
|
|
fzf --layout=reverse --info=hidden --border=none --cycle
|
|
)
|
|
|
|
$interpreter
|
|
|
|
exit
|