2024-04-12 10:19:32 +00:00
|
|
|
#RUN: %fish --interactive %s | %filter-control-sequences
|
2023-03-27 20:55:45 +00:00
|
|
|
# ^ interactive so we can do `complete`
|
2020-10-26 04:00:59 +00:00
|
|
|
mkdir -p __fish_complete_directories/
|
|
|
|
cd __fish_complete_directories
|
|
|
|
mkdir -p test/buildroot
|
|
|
|
mkdir -p test/fish_expand_test
|
2020-02-08 08:48:41 +00:00
|
|
|
mkdir -p test/data/abc
|
|
|
|
mkdir -p test/data/abcd
|
|
|
|
touch test/data/af
|
|
|
|
touch test/data/abcdf
|
|
|
|
mkdir -p test/data/xy
|
|
|
|
mkdir -p test/data/xyz
|
|
|
|
touch test/data/xyf
|
|
|
|
touch test/data/xyzf
|
|
|
|
__fish_complete_directories test/z
|
|
|
|
# No match - no output!
|
|
|
|
__fish_complete_directories test/d
|
|
|
|
#CHECK: test/data/ Directory
|
|
|
|
__fish_complete_directories test/data
|
|
|
|
#CHECK: test/data/ Directory
|
|
|
|
__fish_complete_directories test/data/
|
|
|
|
#CHECK: test/data/abc/ Directory
|
|
|
|
#CHECK: test/data/abcd/ Directory
|
|
|
|
#CHECK: test/data/xy/ Directory
|
|
|
|
#CHECK: test/data/xyz/ Directory
|
|
|
|
__fish_complete_directories test/data/abc 'abc dirs'
|
|
|
|
#CHECK: test/data/abc/ abc dirs
|
|
|
|
#CHECK: test/data/abcd/ abc dirs
|
2023-03-27 20:55:45 +00:00
|
|
|
|
|
|
|
complete -c mydirs -l give-me-dir -a '(__fish_complete_directories)'
|
|
|
|
complete -C'mydirs --give-me-dir='
|
|
|
|
#CHECK: --give-me-dir=test/{{\t}}Directory
|