src/evalfunc.c
static void
f_expandcmd(typval_T *argvars, typval_T *rettv)
{
    exarg_T	eap;
    char_u	*cmdstr;
    char	*errormsg = NULL;

    rettv->v_type = VAR_STRING;
    cmdstr = vim_strsave(tv_get_string(&argvars[0]));

    memset(&eap, 0, sizeof(eap));
    eap.cmd = cmdstr;
    eap.arg = cmdstr;
    eap.argt |= EX_NOSPC;
    eap.usefilter = FALSE;
    eap.nextcmd = NULL;
    eap.cmdidx = CMD_USER;

    expand_filename(&eap, &cmdstr, &errormsg);
    if (errormsg != NULL && *errormsg != NUL)
	emsg(errormsg);

    rettv->vval.v_string = cmdstr;
}
/*
 * "expandcmd()" function
 * Expand all the special characters in a command string.
 */
"expandcmd()" function
Expand all the special characters in a command string.
" expandcmd () " function Expand all the special characters in a command string .
static void
f_expandcmd(typval_T *argvars, typval_T *rettv)
{
    exarg_T	eap;
    char_u	*cmdstr;
    char	*errormsg = NULL;
    rettv->v_type = VAR_STRING;
    cmdstr = vim_strsave(tv_get_string(&argvars[0]));
    memset(&eap, 0, sizeof(eap));
    eap.cmd = cmdstr;
    eap.arg = cmdstr;
    eap.argt |= EX_NOSPC;
    eap.usefilter = FALSE;
    eap.nextcmd = NULL;
    eap.cmdidx = CMD_USER;
    expand_filename(&eap, &cmdstr, &errormsg);
    if (errormsg != NULL && *errormsg != NUL)
	emsg(errormsg);
    rettv->vval.v_string = cmdstr;
}
static void f_expandcmd ( typval_T * argvars , typval_T * rettv ) { exarg_T eap ; char_u * cmdstr ; char * errormsg = NULL ; rettv -> v_type = VAR_STRING ; cmdstr = vim_strsave ( tv_get_string ( & argvars [ 0 ] ) ) ; memset ( & eap , 0 , sizeof ( eap ) ) ; eap . cmd = cmdstr ; eap . arg = cmdstr ; eap . argt |= EX_NOSPC ; eap . usefilter = FALSE ; eap . nextcmd = NULL ; eap . cmdidx = CMD_USER ; expand_filename ( & eap , & cmdstr , & errormsg ) ; if ( errormsg != NULL && * errormsg != NUL ) emsg ( errormsg ) ; rettv -> vval . v_string = cmdstr ; }
"expandcmd()" function
 Expand all the special characters in a command string.
" expandcmd () " function Expand all the special characters in a command string .