Add popup to choose an interpreter and launch it

This commit is contained in:
2025-06-28 12:21:26 +01:00
parent 85ba6d45d1
commit 4f770fd649
2 changed files with 32 additions and 0 deletions

30
interpreter.sh Executable file
View File

@@ -0,0 +1,30 @@
#!/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