Some commands and options are still missing completion,
but most do work well, including modules, functions,
grains and grain item values, nodegroups, salt-key operations, ...
This file should be installed into
/etc/bash_completion.d/salt
I am not sure where and how to do that,
so i leave this open for others to solve.
I had `host: 'loalhost'` (notice the misspelling) set for the grant but
the correct `host: 'localhost'` set for the user & database and when
applying highstate it would bail out with:
```
[INFO ] Executing state mysql_user.present for gladca_prod
[INFO ] User 'gladca_prod'@'localhost' has been created
[INFO ] {'gladca_prod': 'Present'}
[INFO ] Executing state mysql_grants.present for gladca_prod
[INFO ] User 'gladca_prod'@'loalhost' does not exist
Error running 'state.highstate': argument of type 'bool' is not iterable
```
This commit kind of reverts the previous "no more os.sep.join ..." commit by solving the issue which led to switching that code to `os.path.join`. Tested both on linux and windows.
On the parsers cleanup branch, I though about making the available options as equal as possible. Since the log_file setting for the master and the minion could be separately set, I made the logfile option for the key also log_file. Yet, since there's no key specific config file, it shares master, one could only specify the log_file settings from the cli, it could not be hardcoded on the config file, unless, we made a separate config file just for key.
So, in order to reduce required changes, and keep it all as backwards compatible as possible, the key log file options is now, once again, `--key-logfile` which will allow us to hardcode it in the masters config file as `key_logfile`.
This will also, hopefully make travis behave better too.
Python has a specific function to join paths for a reason. Let's see some examples why:
```python
>>> import os
>>> p1 = '/'
>>> p2 = 'foo'
>>> os.path.join(p1, p2)
'/foo'
>>> os.sep.join([p1, p2])
'//foo'
>>> p2 = '/foo'
>>> os.sep.join([p1, p2])
'///foo'
>>> os.path.normpath(os.sep.join([p1, p2]))
'/foo'
>>> p2 = 'foo'
>>> os.path.normpath(os.sep.join([p1, p2]))
'//foo'
>>> p2 = '/foo'
>>> os.path.join(p1, p2)
'/foo'
>>>
```
Also, python docs also state the knowing the OS separator is not always enough to parse/join paths, see http://docs.python.org/library/os#os.sep
There are some posts on the internet which state that `os.sep.join` is faster that `os.path.join`, and, most likely it is, but is it THAT faster? Does that really make a difference in salt's context, specially since it's error prone as shown above?