jump to variable


Is it possible to jump to a variable in a song?

mocp --jump $A s

I am getting a Segmentation fault.

I need this in order to make a A-B repeat script.


Yes, but (assuming the variable contains a numeric value) you will need to write it as '${A}s'.

MOC still shouldn't segfault, though. Which release of MOC are you running?

Version : 2.6-alpha3 I am running.

5509 Segmentation fault mocp --jump ${sA}s

I get, running on Debian stable.


I added a line in my script to see whether $sA is integer or not; it says it is:

[[ $sA == ?(-)+([0-9]) ]] && echo "$sA is an integer"

--jump=N{%,s} Jump to some position in the current track

So I tried:
mocp --jump=$sA{s}

It did not help.


Where did the additional 's' come from?

You're confusing two syntaxes here: shell and documentation.

(sA is a variable, the other s stands for seconds.)
Any way:
This is : Music On Console
Version : 2.5.2
Revision : 2930
Built : Oct 23 2017 11:00:40

The A-B repeat now works.


is working, I forgot to mention.

The segfault was fixed in r2942 and has not yet made it into a release.