diff options
author | Paul Fox <pgf@brightstareng.com> | 2005-08-04 19:04:46 +0000 |
---|---|---|
committer | Paul Fox <pgf@brightstareng.com> | 2005-08-04 19:04:46 +0000 |
commit | 3f11b1bf634536cb01d9913d1a3d10da5bf24541 (patch) | |
tree | fd76457b91cc91d8ae6091729f981acd1b321888 /shell/ash.c | |
parent | 8eeb655661a0d59be478681425682543b228b5a1 (diff) | |
download | busybox-w32-3f11b1bf634536cb01d9913d1a3d10da5bf24541.tar.gz busybox-w32-3f11b1bf634536cb01d9913d1a3d10da5bf24541.tar.bz2 busybox-w32-3f11b1bf634536cb01d9913d1a3d10da5bf24541.zip |
commiting:
0000025: vi-editing mode for ash
Diffstat (limited to 'shell/ash.c')
-rw-r--r-- | shell/ash.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/shell/ash.c b/shell/ash.c index 783204933..7f77594a7 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -1949,19 +1949,21 @@ struct shparam { | |||
1949 | #define bflag optlist[11] | 1949 | #define bflag optlist[11] |
1950 | #define uflag optlist[12] | 1950 | #define uflag optlist[12] |
1951 | #define qflag optlist[13] | 1951 | #define qflag optlist[13] |
1952 | #define viflag optlist[14] | ||
1952 | 1953 | ||
1953 | #ifdef DEBUG | 1954 | #ifdef DEBUG |
1954 | #define nolog optlist[14] | 1955 | #define nolog optlist[15] |
1955 | #define debug optlist[15] | 1956 | #define debug optlist[16] |
1956 | #define NOPTS 16 | 1957 | #endif |
1957 | #else | 1958 | |
1958 | #define NOPTS 14 | 1959 | #ifndef CONFIG_FEATURE_COMMAND_EDITING_VI |
1960 | #define setvimode(on) viflag = 0 /* forcibly keep the option off */ | ||
1959 | #endif | 1961 | #endif |
1960 | 1962 | ||
1961 | /* $NetBSD: options.c,v 1.33 2003/01/22 20:36:04 dsl Exp $ */ | 1963 | /* $NetBSD: options.c,v 1.33 2003/01/22 20:36:04 dsl Exp $ */ |
1962 | 1964 | ||
1963 | 1965 | ||
1964 | static const char *const optletters_optnames[NOPTS] = { | 1966 | static const char *const optletters_optnames[] = { |
1965 | "e" "errexit", | 1967 | "e" "errexit", |
1966 | "f" "noglob", | 1968 | "f" "noglob", |
1967 | "I" "ignoreeof", | 1969 | "I" "ignoreeof", |
@@ -1976,6 +1978,7 @@ static const char *const optletters_optnames[NOPTS] = { | |||
1976 | "b" "notify", | 1978 | "b" "notify", |
1977 | "u" "nounset", | 1979 | "u" "nounset", |
1978 | "q" "quietprofile", | 1980 | "q" "quietprofile", |
1981 | "\0" "vi", | ||
1979 | #ifdef DEBUG | 1982 | #ifdef DEBUG |
1980 | "\0" "nolog", | 1983 | "\0" "nolog", |
1981 | "\0" "debug", | 1984 | "\0" "debug", |
@@ -1985,6 +1988,7 @@ static const char *const optletters_optnames[NOPTS] = { | |||
1985 | #define optletters(n) optletters_optnames[(n)][0] | 1988 | #define optletters(n) optletters_optnames[(n)][0] |
1986 | #define optnames(n) (&optletters_optnames[(n)][1]) | 1989 | #define optnames(n) (&optletters_optnames[(n)][1]) |
1987 | 1990 | ||
1991 | #define NOPTS (sizeof(optletters_optnames)/sizeof(optletters_optnames[0])) | ||
1988 | 1992 | ||
1989 | static char optlist[NOPTS]; | 1993 | static char optlist[NOPTS]; |
1990 | 1994 | ||
@@ -8862,6 +8866,7 @@ optschanged(void) | |||
8862 | #endif | 8866 | #endif |
8863 | setinteractive(iflag); | 8867 | setinteractive(iflag); |
8864 | setjobctl(mflag); | 8868 | setjobctl(mflag); |
8869 | setvimode(viflag); | ||
8865 | } | 8870 | } |
8866 | 8871 | ||
8867 | static inline void | 8872 | static inline void |