1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-07-29 21:27:47 +00:00

Fix custom completion for pass by converting the path pattern string to glob (#1141)

Password file completion for `pass` no longer worked as the pattern was
passed to `ls` as a string.
Fixed it by converting the pattern to a glob.

Co-authored-by: TechnoTecna <techno.tecna@protonmail.com>
This commit is contained in:
Techno Tecna 2025-07-03 10:51:53 +02:00 committed by GitHub
parent b7120045bc
commit f0cd46cafc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,7 +8,7 @@ def pass_completions_directory [] {
export def "nu-complete pass-files" [] {
let dir = (pass_completions_directory)
ls ($dir | path join "**" | path join "*.gpg")
ls ($dir | path join "**" | path join "*.gpg" | into glob)
| get name
| each {|it| ( $it
| path relative-to $dir