v4.6
Use test instead of [ ... ], in accordance with documentation and the rest of the code. fish-shell/fish-shell#1850 says the use of the square brackets for test is highly discouraged. Use 2>/dev/null instead of 2> /dev/null. This is preferred by fish_indent. Use string escape "$path" instead of echo $path | string escape