mirror of
https://github.com/jorgebucaran/fisher
synced 2024-10-09 09:36:53 +02:00
Fix `fisher ls <plugin>
` incorrect directory display (#221)
This commit is contained in:
parent
e79e4bdf2a
commit
185703c22e
1 changed files with 5 additions and 6 deletions
11
fisher.fish
11
fisher.fish
|
@ -830,7 +830,7 @@ function __fisher_list_plugin_directory -a item
|
||||||
|
|
||||||
set -l color (set_color $fish_color_command)
|
set -l color (set_color $fish_color_command)
|
||||||
set -l nc (set_color normal)
|
set -l nc (set_color normal)
|
||||||
set -l inside_tree
|
set -l previous_tree
|
||||||
|
|
||||||
if contains -- --no-color $argv
|
if contains -- --no-color $argv
|
||||||
set color
|
set color
|
||||||
|
@ -845,18 +845,17 @@ function __fisher_list_plugin_directory -a item
|
||||||
switch "$file"
|
switch "$file"
|
||||||
case .\*
|
case .\*
|
||||||
printf " %s\n" $file
|
printf " %s\n" $file
|
||||||
set inside_tree
|
|
||||||
|
|
||||||
case \*/\*
|
case \*/\*
|
||||||
if test -z "$inside_tree"
|
set -l current_tree (dirname $file)
|
||||||
printf " $color%s/$nc\n" (dirname $file)
|
if test "$previous_tree" != "$current_tree"
|
||||||
set inside_tree -
|
printf " $color%s/$nc\n" $current_tree
|
||||||
end
|
end
|
||||||
printf " %s\n" (basename $file)
|
printf " %s\n" (basename $file)
|
||||||
|
set previous_tree $current_tree
|
||||||
|
|
||||||
case \*
|
case \*
|
||||||
printf " %s\n" $file
|
printf " %s\n" $file
|
||||||
set inside_tree
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end > $fd
|
end > $fd
|
||||||
|
|
Loading…
Reference in a new issue