Logo
Explore Help
Sign In
h/fish-shell
1
Fork 0
You've already forked fish-shell
mirror of https://github.com/fish-shell/fish-shell.git synced 2026-05-02 02:41:15 -03:00
Code Issues Packages Projects Releases Wiki Activity
Files
4e68f8a130841bed269f265f668a558af740c75e
fish-shell/share/functions/__fish_is_zfs_feature_enabled.fish

9 lines
342 B
Fish
Raw Normal View History

Mark private functions that don't need localization See the next commit. Part of #11833 (cherry picked from commit a53db72564f9b5da80f61524bd899b282d3d7bd7)
2025-09-29 09:30:35 +02:00
# localization: skip(private)
Simplify and fix `__fish_is_zfs_feature_enabled` (#9939) * Simplify and fix `__fish_is_zfs_feature_enabled` Previously `__fish_is_zfs_feature_enabled` was doing `<whitespace>$queried_feature<whitespace>` pattern matching which was skipping the state part expected in the follow-up checking code. Passing the dataset/snapshot in a `target` argument is pointless. As none of the existing code attempts to do this plus it is also a private function (`__` prefix), rename of the argument and removal of extra text replacement should not be considered a breaking change. * Changed the `&& \` into `|| return` * Run `fish_indent`
2023-08-09 17:28:01 +02:00
function __fish_is_zfs_feature_enabled \
-a feature pool \
-d "Returns 0 if the given ZFS pool feature is active or enabled for the given pool or for any pool if none specified"
type -q zpool || return
zpool get -H -o value $feature $pool 2>/dev/null | string match -rq '^(enabled|active)$'
Added completions/translations for zfs and zpool
2017-11-23 13:55:59 +01:00
end
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.3 Page: 272ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API