mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-24 00:39:48 +08:00
da09a915f2
Reviewing a PR for a completion script caused me to look at the implementation for the `__fish_complete_directories` function. Which in turn lead me to create this change to improve its implementation and add unit tests for the function.
20 lines
597 B
Fish
20 lines
597 B
Fish
cd ..
|
|
mkdir test/data/abc
|
|
mkdir test/data/abcd
|
|
touch test/data/af
|
|
touch test/data/abcdf
|
|
mkdir test/data/xy
|
|
mkdir test/data/xyz
|
|
touch test/data/xyf
|
|
touch test/data/xyzf
|
|
echo \# __fish_complete_directories test/z
|
|
__fish_complete_directories test/z
|
|
echo \# __fish_complete_directories test/d
|
|
__fish_complete_directories test/d
|
|
echo \# __fish_complete_directories test/data
|
|
__fish_complete_directories test/data
|
|
echo \# __fish_complete_directories test/data/
|
|
__fish_complete_directories test/data/
|
|
echo \# __fish_complete_directories test/data/abc
|
|
__fish_complete_directories test/data/abc 'abc dirs'
|