-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
completions: zfs completions broken due to read-only variable #9705
Comments
|
Huh, seems like this was coincidentally fixed in 85504ca but seems like that didn't make the cut for the 3.6.1 release. |
|
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. |
|
Will there be a 3.6.2? |
If you don't wanna wait for a release you can fix the bug by replacing the contents of /usr/share/fish/functions/__fish_is_zfs_feature_enabled.fish with this function __fish_is_zfs_feature_enabled -a feature target -d "Returns 0 if the given ZFS feature is available or enabled"
type -q zpool
or return
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
set -l state (echo $feature_name | cut -f3)
string match -qr '(active|enabled)' -- $state
return $status
endIt's what 85504ca does. |
|
@broizter I've adopted the patch mentioned above, but I still get on history search: |
|
Note that the comment above has a linewrap issue. |
|
I 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
endDoesn'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 |
|
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 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 |
|
2c460cd looks like it's in Integration_3.7.0, am I missing something? |

The text was updated successfully, but these errors were encountered: