code: def _pkg(jail=None, chroot=None, root=None):
      '''
      Returns the prefix for a pkg command, using -j if a jail is specified, or
      -c if chroot is specified.
      '''
      ret = ['pkg']
      if jail:
          ret.extend(['-j', jail])
      elif chroot:
          ret.extend(['-c', chroot])
      elif root:
          ret.extend(['-r', root])
      return ref _pkg(jail=None, chroot=None, root=None):
      '''
      Returns the prefix for a pkg command, using -j if a jail is specified, or
      -c if chroot is specified.
      '''
      ret = ['pkg']
      if jail:
          ret.extend(['-j', jail])
      elif chroot:
          ret.extend(['-c', chroot])
      elif root:
          ret.extend(['-r', root])
      return ret
docs: Returns the prefix for a pkg command, using -j if a jail is specified, or
      -c if chroot is specified.