@staticmethod
def _add_prepend_append_argument(cap, name, destname=None, extrahelp=None):
    """ Add a prepend flags argument and an append flags argument to the config arg parser """
    if destname is None:
        destname = name
    if extrahelp is None:
        extrahelp = ''
    cap.add(''.join(['--', 'prepend', '-', name.upper()]), dest=''.join([
        'prepend', destname.lower()]), action='append', help=' '.join([
        'prepend'.title(), 'the given text to the', name.upper(),
        'already set. Useful for adding search paths etc.', extrahelp]))
    cap.add(''.join(['--', 'append', '-', name.upper()]), dest=''.join([
        'append', destname.lower()]), action='append', help=' '.join([
        'append'.title(), 'the given text to the', name.upper(),
        'already set. Useful for adding search paths etc.', extrahelp]))
