completion: Avoid aliases with `command ls`
If the user has an alias overriding the `ls` command that modifies the output (e.g. `alias ls='ls -F'`), it will cause unexpected characters to appear in completions. Using `command ls` forces the shell to use the command directly, without alias expansion. This also blackholes the stderr of `ls` when used to avoid printing errors during completion if the requisite directory does not exist.
Please register or sign in to comment