1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
#!/bin/bash
# This is to avoid $ARGV0 issues when used with zsh
# Reference: https://github.com/neovim/neovim/blob/master/scripts/genappimage.sh
# Reference: https://github.com/neovim/neovim/issues/9341
unset ARGV0
# Load bundled libraries.
export LD_LIBRARY_PATH="$APPDIR/usr/lib:$LD_LIBRARY_PATH"
# Tell Vifm it's used from an AppImage and what it's root directory is.
export VIFM_APPDIR_ROOT=$APPDIR
# Make ncurses look into the bundled terminfo. Using $TERMINFO_DIRS is better
# than $TERMINFO as it allows preserving any already specified paths. See the
# "ENVIRONMENT" section of `man ncurses` for more details including priority of
# the lookup.
if [ -z "$TERMINFO_DIRS" ]; then
export TERMINFO_DIRS="$APPDIR/usr/share/terminfo"
else
export TERMINFO_DIRS="$TERMINFO_DIRS:$APPDIR/usr/share/terminfo"
fi
exec "$APPDIR/usr/bin/vifm" ${@+"$@"}
|