If you run nextshot -p to paste from clipboard, it calls check_clipboard to check there's an image to paste.
This function relies on is_wayland which is only set in parse_environmentafter options are parsed. This is a problem here because check_clipboard is called during arg-parsing, thus NEXTSHOT_ENV isn't set yet (if autodetection is being relied on).
If you run
nextshot -p
to paste from clipboard, it callscheck_clipboard
to check there's an image to paste.This function relies on
is_wayland
which is only set inparse_environment
after options are parsed. This is a problem here becausecheck_clipboard
is called during arg-parsing, thusNEXTSHOT_ENV
isn't set yet (if autodetection is being relied on).