I believe fish already does some of these things. For example: if there is no binary available in PATH for one of the commands in your history, that command won't be suggested. Same goes for commands that have file/directory names in them that don't exist.