Home / Log
To start an AppImage from the CLI while respecting given folder or file inputs and ignoring other output to stdout, you can use the following approach:
alias cursor="~/AppImages/cursor.appimage"
You can add this line to your ~/.bashrc
or ~/.zshrc
file to make it permanent.
cursor "$@" > /dev/null 2>&1 &
Let’s break this down:
"$@"
passes all command-line arguments to the AppImage> /dev/null
redirects stdout to /dev/null (discarding it)2>&1
redirects stderr to stdout (which is then discarded)&
runs the process in the background~/.bashrc
or ~/.zshrc
:cursor() {
~/AppImages/cursor.appimage "$@" > /dev/null 2>&1 &
}
export -f cursor # optional
After adding this function and sourcing your shell configuration file (or restarting your terminal), you can use the cursor
command as desired:
cursor file.txt
cursor .
cursor folder
This approach will:
Remember to adjust the path if your AppImage location is different from what’s shown here.