Description
Zsh completion was packaged as a part of #60392, but it's not properly packaged. There are two issues:
- The script name should be
_salt instead of salt.zsh. I'm not sure if this is cosmetic or not.
- Near the end of the completion script there is:
salt_dir="${$(python2 -c 'import salt; print(salt.__file__);')%__init__*}"
Salt is currently being distributed as a Python 3 package, so Python 2 would just get an import error there and wouldn't print the installation path.
The only purpose of that line is to print out the path where Salt is installed, but that was intended as a generic solution for various types of installations.
For an RPM (or any other OS package) the packaging scripts know where Salt is going to be installed at package build time, so that line should be replaced with something like:
salt_dir="/usr/lib/python3.6/site-packages/salt"
Setup
Salt installation from an OS package (RPM, deb, etc.).
Steps to Reproduce the behavior
N/A
Expected behavior
Described above.
Screenshots
If applicable, add screenshots to help explain your problem.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
# salt --versions-report
Salt Version:
Salt: 3004rc1
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: Not Installed
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 2.11.1
libgit2: Not Installed
M2Crypto: 0.35.2
Mako: Not Installed
msgpack: 0.6.2
msgpack-pure: Not Installed
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: Not Installed
pycryptodome: Not Installed
pygit2: Not Installed
Python: 3.6.8 (default, Nov 16 2020, 16:55:22)
python-gnupg: Not Installed
PyYAML: 3.13
PyZMQ: 17.0.0
smmap: Not Installed
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.1.4
System Versions:
dist: centos 7 Core
locale: ISO-8859-2
machine: x86_64
release: 3.10.0-1160.42.2.el7.x86_64
system: Linux
version: CentOS Linux 7 Core
Additional context
Add any other context about the problem here.
Description
Zsh completion was packaged as a part of #60392, but it's not properly packaged. There are two issues:
_saltinstead ofsalt.zsh. I'm not sure if this is cosmetic or not.Salt is currently being distributed as a Python 3 package, so Python 2 would just get an import error there and wouldn't print the installation path.
The only purpose of that line is to print out the path where Salt is installed, but that was intended as a generic solution for various types of installations.
For an RPM (or any other OS package) the packaging scripts know where Salt is going to be installed at package build time, so that line should be replaced with something like:
Setup
Salt installation from an OS package (RPM, deb, etc.).
Steps to Reproduce the behavior
N/A
Expected behavior
Described above.
Screenshots
If applicable, add screenshots to help explain your problem.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Additional context
Add any other context about the problem here.