nixos/system/home/scripts/shell/xdg-query-program.sh

4 lines
116 B
Bash

FILETYPE=$(xdg-mime query filetype "$@")
DEFAULT=$(xdg-mime query default "$FILETYPE")
echo "$FILETYPE -> $DEFAULT"