Commit Graph

14 Commits

Author SHA1 Message Date
Mahmoud Al-Qudsi
6c8c8bf819 [zfs] Dynamically complete possible zfs property values
Use the man pages to dynamically generate possible completions for `zfs
set property=` payloads.

[ci skip] // Does that even work for GitHub actions?
2020-11-21 11:05:00 -06:00
Mahmoud Al-Qudsi
6bd4f52b0d [zfs] Optimize enumeration of snapshots
Only generate the list of snapshots when
a) the argument must be a snapshot and nothing else, or
b) the argument as typed contains a literal @, or
c) a snapshot is a valid completion and there is only one dataset
   matching the argument as entered.

Unfortunately, it seems the `zfs` command itself is extremely primitive
and doesn't support listing snapshots by dataset so when we need to
generate completions, we end up needing to enumerate all snapshots
(ever) across all datasets. I'd be very happy to be proven wrong, but I
think the only other way would be manually parse `zdb` output.

See #7472
2020-11-12 22:24:29 -06:00
Mahmoud Al-Qudsi
304649acc6 [zfs] Add completions for new dataset prefix
[ci skip]
2020-09-16 14:37:59 -05:00
Johannes Altmanninger
c54ee22c46 Refactor: remove unnecessary exports 2020-05-19 21:15:11 +02:00
Fabian Homborg
9367d4ff71 Reindent functions to remove useless quotes
This does not include checks/function.fish because that currently
includes a "; end" in a message that indent would remove, breaking the test.
2020-03-09 19:46:43 +01:00
Johannes Altmanninger
660182cfb3 completions/zfs: finish renaming from 05038fc8 2020-03-08 10:00:57 +01:00
Johannes Altmanninger
01d9e56bdd completions/zfs: fix syntax error from f507f4ad 2020-03-08 10:00:57 +01:00
Jason Nader
f507f4ad1e Ddon't use gettext fn in fish functions 2020-02-28 11:29:54 +01:00
Jason Nader
0b7bbb5654 cleanup completions: localise/erase vars where possible
[skip-ci]
2020-02-23 11:10:32 +01:00
Jason
965b142acd Move __fish_print_zfs_* into zfs completion script 2019-12-04 20:53:01 +01:00
Fabian Homborg
ce245704d7 Reformat completion scripts
These were excluded from style.fish
2019-05-05 12:53:09 +02:00
Fabian Homborg
05038fc865 completions/zfs: Stringify 2019-03-14 13:23:47 +01:00
Wilke Schwiedop
bd24e8662e fix 'sort | uniq' 2018-04-09 01:09:49 +02:00
David Guyot
dcf9ce6fc5 Added completions/translations for zfs and zpool 2017-12-21 16:39:06 +01:00