1 /* tilde.h: Externally available variables and function in libtilde.a.
2 $Id: tilde.h,v 1.6 2007/07/01 21:20:31 karl Exp $
4 This file has appeared in prior works by the Free Software Foundation;
5 thus it carries copyright dates from 1988 through 1993.
7 Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 2004, 2007
8 Free Software Foundation, Inc.
10 This program is free software: you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation, either version 3 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program. If not, see <http://www.gnu.org/licenses/>.
23 Written by Brian Fox (bfox@ai.mit.edu). */
30 /* If non-null, this contains the address of a function to call if the
31 standard meaning for expanding a tilde fails. The function is called
32 with the text (sans tilde, as in "foo"), and returns a malloc()'ed string
33 which is the expansion, or a NULL pointer if there is no expansion. */
34 extern CFunction *tilde_expansion_failure_hook;
36 /* When non-null, this is a NULL terminated array of strings which
37 are duplicates for a tilde prefix. Bash uses this to expand
39 extern char **tilde_additional_prefixes;
41 /* When non-null, this is a NULL terminated array of strings which match
42 the end of a username, instead of just "/". Bash sets this to
44 extern char **tilde_additional_suffixes;
46 /* Return a new string which is the result of tilde expanding STRING. */
47 extern char *tilde_expand (char *string);
49 /* Do the work of tilde expansion on FILENAME. FILENAME starts with a
50 tilde. If there is no expansion, call tilde_expansion_failure_hook. */
51 extern char *tilde_expand_word (char *filename);
53 #endif /* not TILDE_H */