#!/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

export LD_LIBRARY_PATH="$APPDIR/usr/lib:$LD_LIBRARY_PATH"
export VIFM_APPDIR_ROOT=$APPDIR
export TERMINFO=$APPDIR/usr/share/terminfo

exec "$APPDIR/usr/bin/vifm" ${@+"$@"}
