6 Avuton Olrich <avuton@gmail.com>
10 If you're running a standard unix or unix clone this should compile clean.
14 See the man pages for usage.
17 Host/Port/Password Handling
18 ---------------------------
19 MPD_HOST and MPD_PORT environment variables are optional and used if they
20 exist. Password can also be prefixed onto the front of the MPD_HOST as such:
23 State files are stored in the directory '~/.mpd_states/'. The files are
24 overwritten as required.
28 * Need to deal with errors differently. Probably log them, and
29 not fail. This will change later.
31 * Bash completion doesn't work with spaces in the state name.
33 * This doesn't sucessfully restore a few things, simply by design
34 * Any *ids, ie. playlistid
35 * Random, if a playlist was ordered in random and has
36 played for any length of time it will not know
37 what has already played.
39 Diff between a proper MPD state file & a state-utils state file:
40 ----------------------------------------------------------------
47 Q: Can you make it where it can save elsewhere than $HOME/.mpd_states/?
48 A: I don't plan on it, unless it's done strictly for porting. If you
49 want it somewhere else it should be easy enough to symlink,
50 and if that's not possible tell me.
52 Bash Completion *This does not work with spaces in state names*:
54 # Simply copy this into your bashrc
55 # cat state_bashrc >> ~/.bashrc
59 cur=${COMP_WORDS[COMP_CWORD]}
63 if (($COMP_CWORD == 1)); then
64 COMPREPLY=( "$( ls --color=never ~/.mpd_states/ | grep "^$cur" )" )
71 complete -F _state-save state-save state-restore