mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-07 01:51:14 -03:00
The main changes are: - disabling some checks related to POSIX file permissions when a filesystem is mounted with "noacl" (default on MSYS2) - disabling some checks related to symlinks when using fake ones (file copy) Windows with acl hasn't been tested because 1) Cygwin itself does not have any Rust package yet to compile fish, and 2) MSYS2 defaults to `noacl` Part of #12171
44 lines
1.5 KiB
Fish
44 lines
1.5 KiB
Fish
#RUN: fish=%fish %fish %s
|
|
__fish_migrate # make sure the interactive fish doesn't need mkdir in PATH
|
|
if __fish_is_cygwin
|
|
# The Cygwin/MSYS DLLs must be in the path, otherwise fish cannot be
|
|
# executed
|
|
set -g PATH /usr/bin
|
|
else
|
|
set -g PATH
|
|
end
|
|
|
|
$fish -c "nonexistent-command-1234 banana rama"
|
|
#CHECKERR: fish: Unknown command: nonexistent-command-1234
|
|
#CHECKERR: fish:
|
|
#CHECKERR: nonexistent-command-1234 banana rama
|
|
#CHECKERR: ^~~~~~~~~~~~~~~~~~~~~~~^
|
|
$fish -C 'function fish_command_not_found; echo cmd-not-found; end' -ic "nonexistent-command-1234 1 2 3 4"
|
|
#CHECKERR: cmd-not-found
|
|
#CHECKERR: fish:
|
|
#CHECKERR: nonexistent-command-1234 1 2 3 4
|
|
#CHECKERR: ^~~~~~~~~~~~~~~~~~~~~~~^
|
|
$fish -C 'function fish_command_not_found; echo command-not-found $argv; end' -c "nonexistent-command-abcd foo bar baz"
|
|
#CHECKERR: command-not-found nonexistent-command-abcd foo bar baz
|
|
#CHECKERR: fish:
|
|
#CHECKERR: nonexistent-command-abcd foo bar baz
|
|
#CHECKERR: ^~~~~~~~~~~~~~~~~~~~~~~^
|
|
|
|
$fish -C 'functions --erase fish_command_not_found' -c 'nonexistent-command apple friday'
|
|
#CHECKERR: fish: Unknown command: nonexistent-command
|
|
#CHECKERR: nonexistent-command apple friday
|
|
#CHECKERR: ^~~~~~~~~~~~~~~~~~^
|
|
|
|
command -v nonexistent-command-1234
|
|
echo $status
|
|
#CHECK: 127
|
|
|
|
set -g PATH .
|
|
echo banana >foobar
|
|
foobar --banana
|
|
# CHECKERR: {{.*}}checks/command-not-found.fish (line {{\d+}}): Unknown command. './foobar' exists but is not an executable file.
|
|
# CHECKERR: foobar --banana
|
|
# CHECKERR: ^~~~~^
|
|
|
|
exit 0
|