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-04-29 08:41:15 -03:00
Code Issues Packages Projects Releases Wiki Activity
Files
a317a6acd9839e55bcbf55b122bd1619d22a5efa
fish-shell/share/functions/__fish_is_zfs_feature_enabled.fish

8 lines
312 B
Fish
Raw Normal View History

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: 151ms Template: 1ms
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