Skip to content

Commit

Permalink
Complete recent files with globbed-files comp tag
Browse files Browse the repository at this point in the history
- Complete recent files (if defined) if comp tag contains globbed-files
- Set proper description for the completion (atm both are called recent directory which is wrong)

Signed-off-by: Tomas Slusny <[email protected]>
  • Loading branch information
deathbeam authored and marlonrichert committed Mar 25, 2024
1 parent 93f342d commit 87a0c5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Completions/_autocomplete__recent_paths
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ _autocomplete__recent_paths() {
local -P tag=
for tag in directories files; do
if [[ -v functions[+autocomplete:recent-$tag] &&
$_comp_tags == (|* )(|(all|local)-)$tag(| *) ]] &&
$_comp_tags == (|* )(|(all|local|globbed)-)$tag(| *) ]] &&
+autocomplete:recent-$tag "$PREFIX$SUFFIX"; then
files=( "$reply[@]" )
_description -V recent-$tag expl 'recent directory'
_description -V recent-$tag expl "recent $tag"
_autocomplete__recent_paths_add $files[@] &&
ret=0
fi
Expand Down

0 comments on commit 87a0c5a

Please sign in to comment.