Lines Matching refs:expansion

1 /* tilde.c -- Tilde expansion code (~/foo := $HOME/foo). */
100 which is the expansion, or a NULL pointer if the expansion fails. */
106 which is the expansion, or a NULL pointer if there is no expansion. */
124 /* Find the start of a tilde expansion in STRING, and return the index of
125 the tilde which starts the expansion. Place the length of the text
160 /* Find the end of a tilde expansion in STRING, and return the index of
208 char *tilde_word, *expansion;
211 /* Make START point to the tilde which starts the expansion. */
238 expansion = tilde_expand_word (tilde_word);
241 len = strlen (expansion);
245 if (len > 1 || *expansion != '/' || *string != '/')
251 strcpy (result + result_index, expansion);
254 free (expansion);
288 the portion of the string that should be passed to the tilde expansion
339 /* Do the work of tilde expansion on FILENAME. FILENAME starts with a
340 tilde. If there is no expansion, call tilde_expansion_failure_hook.
346 char *dirname, *expansion, *username;
362 expansion = sh_get_env_value ("HOME");
366 if (expansion == 0)
367 expansion = sh_get_home_dir ();
369 return (glue_prefix_and_suffix (expansion, filename, 1));
376 expansion = (*tilde_expansion_preexpansion_hook) (username);
377 if (expansion)
379 dirname = glue_prefix_and_suffix (expansion, filename, user_len);
381 free (expansion);
397 and we couldn't find a standard expansion, then let them try. */
400 expansion = (*tilde_expansion_failure_hook) (username);
401 if (expansion)
403 dirname = glue_prefix_and_suffix (expansion, filename, user_len);
404 free (expansion);