| |
@@ -0,0 +1,48 @@
|
| |
+ = Shell Completions
|
| |
+
|
| |
+ Shell completions are command line completions for a specific shell,
|
| |
+ such as Bash, fish or Zsh.
|
| |
+
|
| |
+ == RPM Macros
|
| |
+
|
| |
+ The following macros *MUST* be used instead of hardcoding paths.
|
| |
+
|
| |
+ [cols=",",options="header"]
|
| |
+ |======================================================================
|
| |
+ | macro | definition
|
| |
+ | +%{bash_completions_dir}+ | +%{_datadir}/bash-completion/completions+
|
| |
+ | +%{fish_completions_dir}+ | +%{_datadir}/fish/vendor_completions.d+
|
| |
+ | +%{zsh_completions_dir}+ | +%{_datadir}/zsh/site-functions+
|
| |
+ |======================================================================
|
| |
+
|
| |
+
|
| |
+ == Shell Completions Packaging
|
| |
+
|
| |
+ Shell completion files *MUST* use standard file permissions (0644).
|
| |
+
|
| |
+ === Example of shell completions packaging
|
| |
+
|
| |
+ [source, rpm-spec]
|
| |
+ ----
|
| |
+ Name: foo
|
| |
+ ...
|
| |
+
|
| |
+ %install
|
| |
+ ...
|
| |
+
|
| |
+ # Bash completion
|
| |
+ install -Dpm 0644 foo.bash -t %{buildroot}%{bash_completions_dir}
|
| |
+
|
| |
+ # Fish completion
|
| |
+ install -Dpm 0644 foo.fish -t %{buildroot}%{fish_completions_dir}
|
| |
+
|
| |
+ # Zsh completion
|
| |
+ install -Dpm 0644 _foo -t %{buildroot}%{zsh_completions_dir}
|
| |
+ ...
|
| |
+
|
| |
+ %files
|
| |
+ %{bash_completions_dir}/foo.bash
|
| |
+ %{fish_completions_dir}/foo.fish
|
| |
+ %{zsh_completions_dir}/_foo
|
| |
+
|
| |
+ ----
|
| |
Adds section for shell-completions and a MUST on using the macros as approved(I think?) here.