aboutsummaryrefslogtreecommitdiffstats
path: root/builtins
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2012-05-31 15:11:45 -0400
committerChet Ramey <chet.ramey@case.edu>2012-05-31 15:11:45 -0400
commit16b2d7f4ea7aa2e52c697bc7f623bf791725f42b (patch)
treeb5e5c94188a803cbbfc908648a42048b5961ce30 /builtins
parentcd110fdfc29a8766f71a8f9fbb0e011b83d23763 (diff)
downloadandroid_external_bash-16b2d7f4ea7aa2e52c697bc7f623bf791725f42b.tar.gz
android_external_bash-16b2d7f4ea7aa2e52c697bc7f623bf791725f42b.tar.bz2
android_external_bash-16b2d7f4ea7aa2e52c697bc7f623bf791725f42b.zip
Bash-4.2 patch 29
Diffstat (limited to 'builtins')
-rw-r--r--builtins/shopt.def22
1 files changed, 21 insertions, 1 deletions
diff --git a/builtins/shopt.def b/builtins/shopt.def
index 27685aa..6cd8c4f 100644
--- a/builtins/shopt.def
+++ b/builtins/shopt.def
@@ -61,6 +61,10 @@ $END
#include "common.h"
#include "bashgetopt.h"
+#if defined (READLINE)
+# include "../bashline.h"
+#endif
+
#if defined (HISTORY)
# include "../bashhist.h"
#endif
@@ -94,7 +98,7 @@ extern int extended_glob;
extern int hist_verify, history_reediting, perform_hostname_completion;
extern int no_empty_command_completion;
extern int force_fignore;
-extern int dircomplete_spelling;
+extern int dircomplete_spelling, dircomplete_expand;
extern int enable_hostname_completion __P((int));
#endif
@@ -121,6 +125,10 @@ static int set_compatibility_level __P((char *, int));
static int set_restricted_shell __P((char *, int));
#endif
+#if defined (READLINE)
+static int shopt_set_complete_direxpand __P((char *, int));
+#endif
+
static int shopt_login_shell;
static int shopt_compat31;
static int shopt_compat32;
@@ -150,6 +158,7 @@ static struct {
{ "compat40", &shopt_compat40, set_compatibility_level },
{ "compat41", &shopt_compat41, set_compatibility_level },
#if defined (READLINE)
+ { "direxpand", &dircomplete_expand, shopt_set_complete_direxpand },
{ "dirspell", &dircomplete_spelling, (shopt_set_func_t *)NULL },
#endif
{ "dotglob", &glob_dot_filenames, (shopt_set_func_t *)NULL },
@@ -535,6 +544,17 @@ set_compatibility_level (option_name, mode)
return 0;
}
+#if defined (READLINE)
+static int
+shopt_set_complete_direxpand (option_name, mode)
+ char *option_name;
+ int mode;
+{
+ set_directory_hook ();
+ return 0;
+}
+#endif
+
#if defined (RESTRICTED_SHELL)
/* Don't allow the value of restricted_shell to be modified. */