@optique/core 1.0.15-dev.2764 → 1.0.15-dev.2777
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/completion.cjs +8 -7
- package/dist/completion.js +8 -7
- package/package.json +1 -1
package/dist/completion.cjs
CHANGED
|
@@ -695,8 +695,8 @@ ${escapedArgs ? ` set -l output (${programName} ${escapedArgs} $prev $current
|
|
|
695
695
|
# dotfiles, so also scan .* when the filter targets them.
|
|
696
696
|
for __item in $__glob_dir/*
|
|
697
697
|
if test -e "$__item"
|
|
698
|
-
set -l __bn (basename "$__item")
|
|
699
|
-
if string match -q "$__glob_filter"
|
|
698
|
+
set -l __bn (basename -- "$__item")
|
|
699
|
+
if string match -q -- "$__glob_filter" "$__bn"
|
|
700
700
|
set -a __candidates "$__item"
|
|
701
701
|
end
|
|
702
702
|
end
|
|
@@ -704,11 +704,11 @@ ${escapedArgs ? ` set -l output (${programName} ${escapedArgs} $prev $current
|
|
|
704
704
|
if string match -q '.*' -- "$__glob_filter"
|
|
705
705
|
for __item in $__glob_dir/.*
|
|
706
706
|
if test -e "$__item"
|
|
707
|
-
set -l __bn (basename "$__item")
|
|
707
|
+
set -l __bn (basename -- "$__item")
|
|
708
708
|
if test "$__bn" = "." -o "$__bn" = ".."
|
|
709
709
|
continue
|
|
710
710
|
end
|
|
711
|
-
if string match -q "$__glob_filter"
|
|
711
|
+
if string match -q -- "$__glob_filter" "$__bn"
|
|
712
712
|
set -a __candidates "$__item"
|
|
713
713
|
end
|
|
714
714
|
end
|
|
@@ -822,7 +822,7 @@ ${escapedArgs ? ` set -l output (${programName} ${escapedArgs} $prev $current
|
|
|
822
822
|
if test "$hidden" != "1" -a (string sub -l 1 -- $__glob_basename) != "."
|
|
823
823
|
set -l filtered
|
|
824
824
|
for item in $items
|
|
825
|
-
set -l basename (basename $item)
|
|
825
|
+
set -l basename (basename -- "$item")
|
|
826
826
|
if not string match -q '.*' -- $basename
|
|
827
827
|
set -a filtered $item
|
|
828
828
|
end
|
|
@@ -839,9 +839,10 @@ ${escapedArgs ? ` set -l output (${programName} ${escapedArgs} $prev $current
|
|
|
839
839
|
set items $restored
|
|
840
840
|
end
|
|
841
841
|
|
|
842
|
-
# Output file completions
|
|
842
|
+
# Output file completions. Use printf rather than echo, which
|
|
843
|
+
# would take filenames like -n or -e as its own options.
|
|
843
844
|
for item in $items
|
|
844
|
-
|
|
845
|
+
printf '%s\\n' $item
|
|
845
846
|
end
|
|
846
847
|
else
|
|
847
848
|
# Regular literal completion - split by tab
|
package/dist/completion.js
CHANGED
|
@@ -695,8 +695,8 @@ ${escapedArgs ? ` set -l output (${programName} ${escapedArgs} $prev $current
|
|
|
695
695
|
# dotfiles, so also scan .* when the filter targets them.
|
|
696
696
|
for __item in $__glob_dir/*
|
|
697
697
|
if test -e "$__item"
|
|
698
|
-
set -l __bn (basename "$__item")
|
|
699
|
-
if string match -q "$__glob_filter"
|
|
698
|
+
set -l __bn (basename -- "$__item")
|
|
699
|
+
if string match -q -- "$__glob_filter" "$__bn"
|
|
700
700
|
set -a __candidates "$__item"
|
|
701
701
|
end
|
|
702
702
|
end
|
|
@@ -704,11 +704,11 @@ ${escapedArgs ? ` set -l output (${programName} ${escapedArgs} $prev $current
|
|
|
704
704
|
if string match -q '.*' -- "$__glob_filter"
|
|
705
705
|
for __item in $__glob_dir/.*
|
|
706
706
|
if test -e "$__item"
|
|
707
|
-
set -l __bn (basename "$__item")
|
|
707
|
+
set -l __bn (basename -- "$__item")
|
|
708
708
|
if test "$__bn" = "." -o "$__bn" = ".."
|
|
709
709
|
continue
|
|
710
710
|
end
|
|
711
|
-
if string match -q "$__glob_filter"
|
|
711
|
+
if string match -q -- "$__glob_filter" "$__bn"
|
|
712
712
|
set -a __candidates "$__item"
|
|
713
713
|
end
|
|
714
714
|
end
|
|
@@ -822,7 +822,7 @@ ${escapedArgs ? ` set -l output (${programName} ${escapedArgs} $prev $current
|
|
|
822
822
|
if test "$hidden" != "1" -a (string sub -l 1 -- $__glob_basename) != "."
|
|
823
823
|
set -l filtered
|
|
824
824
|
for item in $items
|
|
825
|
-
set -l basename (basename $item)
|
|
825
|
+
set -l basename (basename -- "$item")
|
|
826
826
|
if not string match -q '.*' -- $basename
|
|
827
827
|
set -a filtered $item
|
|
828
828
|
end
|
|
@@ -839,9 +839,10 @@ ${escapedArgs ? ` set -l output (${programName} ${escapedArgs} $prev $current
|
|
|
839
839
|
set items $restored
|
|
840
840
|
end
|
|
841
841
|
|
|
842
|
-
# Output file completions
|
|
842
|
+
# Output file completions. Use printf rather than echo, which
|
|
843
|
+
# would take filenames like -n or -e as its own options.
|
|
843
844
|
for item in $items
|
|
844
|
-
|
|
845
|
+
printf '%s\\n' $item
|
|
845
846
|
end
|
|
846
847
|
else
|
|
847
848
|
# Regular literal completion - split by tab
|