settings: expand ~ to home directory in mpd_host
This commit is contained in:
1
NEWS
1
NEWS
@@ -4,6 +4,7 @@ ncmpcpp-0.7 (????-??-??)
|
|||||||
* Visualizer has now support for two more modes: sound wave filled and sound ellipse.
|
* Visualizer has now support for two more modes: sound wave filled and sound ellipse.
|
||||||
* It is now possible to abort the current action using Ctrl-C or Ctrl-G in prompt mode. As a result, empty value is no longer a special value that aborts most of the actions.
|
* It is now possible to abort the current action using Ctrl-C or Ctrl-G in prompt mode. As a result, empty value is no longer a special value that aborts most of the actions.
|
||||||
* Directories and playlists in browser can now be sorted by modification time.
|
* Directories and playlists in browser can now be sorted by modification time.
|
||||||
|
* ~ is now expanded to home directory in mpd_host configuration variable.
|
||||||
|
|
||||||
ncmpcpp-0.6.1 (2014-11-06)
|
ncmpcpp-0.6.1 (2014-11-06)
|
||||||
|
|
||||||
|
|||||||
@@ -195,6 +195,8 @@ bool Configuration::read(const std::string &config_path)
|
|||||||
));
|
));
|
||||||
p.add("mpd_host", assign_default<std::string>(
|
p.add("mpd_host", assign_default<std::string>(
|
||||||
mpd_host, "localhost", [](std::string host) {
|
mpd_host, "localhost", [](std::string host) {
|
||||||
|
// host can be a path to ipc socket, relative to home directory
|
||||||
|
expand_home(host);
|
||||||
Mpd.SetHostname(host);
|
Mpd.SetHostname(host);
|
||||||
return host;
|
return host;
|
||||||
}));
|
}));
|
||||||
|
|||||||
Reference in New Issue
Block a user