Edit2: On thinking about this a bit more the difference between using -f or not is the matching against the process name only and matching against the full command line (process name + arguments). Theoretically matching against the process name only could also be done if pgrep would use /proc/_pid_/cmdline instead and just cut its content before the first argument. That would all keep as it is but the character limit would be eliminated. Or is there a special reason why pgrep does get the process name from /proc/_pid_/stat?
Edit2: On thinking about this a bit more the difference between using -f or not is the matching against the process name only and matching against the full command line (process name + arguments). Theoretically matching against the process name only could also be done if pgrep would use /proc/_pid_/cmdline instead and just cut its content before the first argument. That would all keep as it is but the character limit would be eliminated. Or is there a special reason why pgrep does get the process name from /proc/_pid_/stat?