Skip to content

Commit

Permalink
Add McFly
Browse files Browse the repository at this point in the history
Root cause of the .bashrc/.profile split: Its binary is located in
~/.local/bin, but that's added to the PATH in .profile _after_ it
sources .bashrc (creating a Catch-22 with regards to properly activating
it).
  • Loading branch information
thijsputman committed Feb 20, 2024
1 parent 74e9f28 commit d0867fa
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .bashrc.d/98-mcfly
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

if command -v mcfly &> /dev/null; then

export MCFLY_FUZZY=2
export MCFLY_RESULTS=$(($(tput lines) - 4))
export MCFLY_INTERFACE_VIEW=BOTTOM

eval "$(mcfly init bash)"

fi
14 changes: 14 additions & 0 deletions install/bins.d/mcfly
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

set -euo pipefail

arch=$(uname -m)
base=https://github.com/cantino/mcfly/releases/download
: "${version:=v0.8.4}"

wget -nv -O- \
"${base}/${version}/mcfly-${version}-${arch}-unknown-linux-musl.tar.gz" |
tar -xzv
mv -f mcfly ~/.local/bin

command -v mcfly && mcfly --version

0 comments on commit d0867fa

Please sign in to comment.