rossmacarthur / sheldon

:bowtie: Fast, configurable, shell plugin manager
https://sheldon.cli.rs
Apache License 2.0
958 stars 21 forks source link

Deprecation warning caused by `plugins.lock` #175

Closed asbachb closed 5 months ago

asbachb commented 5 months ago

On my archlinux installation I get following warning when I open the terminal:

WARNING: use of deprecated filter `get` in [templates], please use the `?.` operator instead.
For example: `{{ hooks | get: "pre" | nl }}` can be written `{{ hook?.pre | nl }}`

This triggers a zsh warning: [WARNING]: Console output during zsh initialization detected.

I suspect plugins.lock is causing that warning:

[templates]
PATH = "export PATH=\"{{ dir }}:$PATH\""
path = "path=( \"{{ dir }}\" $path )"
fpath = "fpath=( \"{{ dir }}\" $fpath )"
source = """
{{ hooks?.pre | nl }}{% for file in files %}source \"{{ file }}\"
{% endfor %}{{ hooks?.post | nl }}"""
defer = """
{{ hooks | get: \"pre\" | nl }}{% for file in files %}zsh-defer source \"{{ file }}\"
{% endfor %}{{ hooks | get: \"post\" | nl }}"""
rossmacarthur commented 5 months ago

Hi please see the release notes:

https://github.com/rossmacarthur/sheldon/blob/trunk/RELEASES.md#074

You will need to update your defer template in your sheldon config file.