mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-19 23:21:15 -03:00
Sometimes, the dirname of a completion is much longer than the basename. When the dirname is the same for many completions, a long common dirname prefix makes it hard to see the interesting differences in the basenames. Fix this by collapsing the dirname prefix to "…/". In future, we should find a generic way to collapse completions that don't contain slashes. Closes #8618 Closes #11250
27 lines
616 B
Fish
27 lines
616 B
Fish
#RUN: %fish %s
|
|
#REQUIRES: command -v tmux
|
|
#REQUIRES: test -z "$CI"
|
|
|
|
isolated-tmux-start
|
|
|
|
# Check no collapse
|
|
mkdir -p a/b
|
|
echo > a/b/f1
|
|
echo > a/b/f2
|
|
isolated-tmux send-keys 'HOME=$PWD ls ~/a/b/' Tab
|
|
tmux-sleep
|
|
isolated-tmux capture-pane -p
|
|
# CHECK: prompt 0> HOME=$PWD ls ~/a/b/f
|
|
# CHECK: ~/a/b/f1 ~/a/b/f2
|
|
|
|
# Check collapse
|
|
isolated-tmux send-keys C-c
|
|
mkdir -p dddddd/eeeeee
|
|
echo > dddddd/eeeeee/file1
|
|
echo > dddddd/eeeeee/file2
|
|
isolated-tmux send-keys 'HOME=$PWD ls ~/dddddd/eeeeee/' Tab
|
|
tmux-sleep
|
|
isolated-tmux capture-pane -p
|
|
# CHECK: prompt 0> HOME=$PWD ls ~/dddddd/eeeeee/file
|
|
# CHECK: …/file1 …/file2
|