Repository navigation
completions: zfs completions broken due to read-only variable #9705
Description
Activity
Huh, seems like this was coincidentally fixed in 85504ca but seems like that didn't make the cut for the 3.6.1 release.
Reacted by dm17- changed the title
[-]completions: zsh completions broken due to read-only variable[/-][+]completions: zfs completions broken due to read-only variable[/+]on Apr 3, 2023 Closing this with a 3.6.2 milestone so we'd add it if we make a 3.6.2 release - other than that it's already fixed so the next full release will include it.
I do consider this to be a good reason to cut a 3.6.2 release, fwiw.
Reacted by Jason Nader, Sridaran Thoniyil, Etienne Maheu, Bakhtiyar Neyman, Qingyao Sun, unknowntrojan, Robert, Diana and dm17- addedbugSomething that's not working as intendedSomething that's not working as intendedand removed
on Apr 3, 2023 Will there be a 3.6.2?
@broizter I've adopted the patch mentioned above, but I still get on history search:
~ zfs create z0tank/games -o mountpoint=/home/ben/G/usr/share/fish/functions/__fish_is_zfs_feature_enabled.fish (line 8): Expected end of the statement, but found an incomplete token So 30 Jul 2023 11:13:39 CEST set feature_name (zpool get -H all $pool 2>/dev/null | string match -r "$pool\s$feature\s") ^ from sourcing file /usr/share/fish/functions/__fish_is_zfs_feature_enabled.fish called on line 1 of file /usr/share/fish/completions/zfs.fish from sourcing file /usr/share/fish/completions/zfs.fish source: Error while reading file '/usr/share/fish/functions/__fish_is_zfs_feature_enabled.fish' __fish_is_zfs_feature_enabled: Befehl nicht gefunden. /usr/share/fish/completions/zfs.fish (line 344): if __fish_is_zfs_feature_enabled 'feature@bookmarks' ^~~~~~~~~~~~~~~~~~~~~~~~~~~~^ from sourcing file /usr/share/fish/completions/zfs.fish __fish_is_zfs_feature_enabled: Befehl nicht gefunden. /usr/share/fish/completions/zfs.fish (line 508): if __fish_is_zfs_feature_enabled 'feature@bookmarks' ^~~~~~~~~~~~~~~~~~~~~~~~~~~~^ from sourcing file /usr/share/fish/completions/zfs.fish __fish_is_zfs_feature_enabled: Befehl nicht gefunden. /usr/share/fish/completions/zfs.fish (line 548): if __fish_is_zfs_feature_enabled "feature@extensible_dataset" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~^ from sourcing file /usr/share/fish/completions/zfs.fish ame s ``` Any hints?Note that the comment above has a linewrap issue.
The first line should be exactly this:
function __fish_is_zfs_feature_enabled -a feature target -d "Returns 0 if the given ZFS feature is available or enabled for the given full-path target (zpool or dataset), or any target if none given"
and the second line begins with (indented)set -l poolReacted by Benjamin SchmidI am getting this problem on 3.6.4 on Ubuntu 23.10 (official ppa):
These are the contents of the file in question:
function __fish_is_zfs_feature_enabled -a feature target -d "Returns 0 if the given ZFS feature is available or enabled for the given full-path target (zpool or dataset), or any target if none given" set -l pool (string replace -r '/.*' '' -- $target) set -l feature_name "" if test -z "$pool" set feature_name (zpool get -H all 2>/dev/null | string match -r "\s$feature\s") else set feature_name (zpool get -H all $pool 2>/dev/null | string match -r "$pool\s$feature\s") end if test $status -ne 0 # No such feature return 1 end echo $feature_name | read -l _ _ state _ set -l state (echo $feature_name | cut -f3) string match -qr '(active|enabled)' -- $state return $status end
Doesn't seem like 85504ca is in there
Similar to @luispabon I get the same error after upstream update from PPA to 3.6.4.
Obviously I patched
/usr/share/fish/functions/__fish_is_zfs_feature_enabled.fishmanually before as described in the comments, but it seems to have been overwritten again with a broken version.There might be an issue with the ppa's packaging, the file in the repo is completely different to the file installed by the .deb on the ppa:The above was wrong, the file in 3.6.4 master is completely different to this here file in master:
Looks like the changes were merged back in august to master, perhaps 3.6.x releases from a branch instead?
@luispabon You're right: 85504ca is only in
masterwhile the last commit of 3.6.4 before release b2ef44a is inIntegration_3.6.4andIntegration_3.7.0.It seems 3.6.x and 3.7.x are not including the fix yet. Not sure how the team cherry-picks/selects what goes into which integration branch.
I've replaced my local file for the one in master and seems to be working fine.
@zanchey FYI for next release
Reacted by Kyle Manna2c460cd looks like it's in Integration_3.7.0, am I missing something?
Reacted by Jason Nader- locked as resolved and limited conversation to collaborators
on Apr 6, 2026
