diff options
author | Akinori MUSHA <knu@FreeBSD.org> | 2002-04-15 17:55:19 +0000 |
---|---|---|
committer | Akinori MUSHA <knu@FreeBSD.org> | 2002-04-15 17:55:19 +0000 |
commit | c453eb1186d4f111f1ac4927dbad55281408d0f2 (patch) | |
tree | ab0262c5d9744bc067420f88cc18d544d4ca36a2 /shells | |
parent | Update to match recent changes to current kernel API (mtx_init, suser). (diff) |
- Add a patch from the author that fixes a bug in file name
completion. Bump PORTREVISION accordingly.
- Default the number of columns to 1.
- Add some nifty launcher definitions.
Submitted by: nork (partly)
Notes
Notes:
svn path=/head/; revision=57726
Diffstat (limited to 'shells')
-rw-r--r-- | shells/fd/Makefile | 1 | ||||
-rw-r--r-- | shells/fd/files/patch-_fdrc | 27 | ||||
-rw-r--r-- | shells/fd/files/patch-input.c | 189 |
3 files changed, 209 insertions, 8 deletions
diff --git a/shells/fd/Makefile b/shells/fd/Makefile index 693a36cfb5e7..02435ffde518 100644 --- a/shells/fd/Makefile +++ b/shells/fd/Makefile @@ -7,6 +7,7 @@ PORTNAME= fd PORTVERSION= 2.00b +PORTREVISION= 1 CATEGORIES= shells MASTER_SITES= http://hp.vector.co.jp/authors/VA012337/soft/fd/ \ ftp://ftp.vector.co.jp/pack/unix/util/file/filer/fd/ diff --git a/shells/fd/files/patch-_fdrc b/shells/fd/files/patch-_fdrc index 79d467965444..7a4f731552d2 100644 --- a/shells/fd/files/patch-_fdrc +++ b/shells/fd/files/patch-_fdrc @@ -1,5 +1,5 @@ ---- _fdrc.orig Wed Feb 6 00:00:00 2002 -+++ _fdrc Mon Feb 11 01:28:06 2002 +--- _fdrc.orig Wed Mar 27 00:00:00 2002 ++++ _fdrc Thu Apr 11 22:06:39 2002 @@ -13,2 +13,3 @@ #SORTTYPE=0 +FD_SORTTYPE=101 @@ -12,19 +12,23 @@ #ADJTTY=0 +FD_ADJTTY=1 -@@ -104,2 +107,3 @@ +@@ -62,2 +65,3 @@ + #COLUMNS=2 ++FD_COLUMNS=1 + +@@ -104,2 +108,3 @@ #ANSICOLOR=0 +FD_ANSICOLOR=1 -@@ -144,2 +148,3 @@ +@@ -144,2 +149,3 @@ #LANGUAGE=$LANG +FD_LANGUAGE=$LANG -@@ -215,2 +220,3 @@ +@@ -215,2 +221,3 @@ #PAGER=more%K -+FD_PAGER=${PAGER:-more}%K ++FD_PAGER=${PAGER:-/usr/bin/more}%K #EDITOR=vi -@@ -222,2 +228,35 @@ +@@ -222,2 +229,42 @@ # launcher definition +tar="tar" + @@ -59,8 +63,15 @@ + +launch ".bz2" "bzip2 -cd %C | $PAGER" + ++# RCS/CVS files ++launch ",v" "rlog %C | $PAGER" ++ ++# distribution files ++launch ".aa" "cat %X.?? | $tar tvfz -" "$tar_format" ++arch ".aa" "echo ERROR" "cat %X.?? | $tar zxf - %TA" ++ #(Default) -@@ -325,2 +364,33 @@ +@@ -325,2 +372,33 @@ # archiver definition + +arch ".tar" "$tar cf %C %T" "$tar xf %C %TA" diff --git a/shells/fd/files/patch-input.c b/shells/fd/files/patch-input.c new file mode 100644 index 000000000000..b96651d9f2d9 --- /dev/null +++ b/shells/fd/files/patch-input.c @@ -0,0 +1,189 @@ +diff -u ../old/FD-2.00b/input.c ./input.c +--- ../old/FD-2.00b/input.c Wed Mar 27 00:00:00 2002 ++++ ./input.c Fri Apr 12 12:01:19 2002 +@@ -1047,8 +1047,11 @@ + char *s; + int cx, len, plen, max, linemax, comline, cont; + { ++# if !MSDOS || !defined (_NOORIGSHELL) ++ int bq; ++# endif + char *cp1, *cp2, **argv; +- int i, l, ins, top, fix, argc, quote, quoted; ++ int i, l, ins, top, fix, argc, quote, quoted, hasmeta; + + if (selectlist && cont > 0) { + selectfile(tmpfilepos++, NULL); +@@ -1056,17 +1059,26 @@ + return(0); + } + +- for (i = top = 0, quote = '\0'; i < cx; i++) { +- if (s[i] == quote) quote = '\0'; ++# if !MSDOS || !defined (_NOORIGSHELL) ++ bq = 0; ++# endif ++ quote = '\0'; ++ quoted = 0; ++ for (i = top = 0; i < cx; i++) { ++ if (s[i] == quote) { ++ if (quote == '"') quoted = i; ++# if !MSDOS || !defined (_NOORIGSHELL) ++ if (quote == '\'') quoted = i; ++# endif ++ quote = '\0'; ++ } + else if (iskanji1(s, i)) i++; + else if (quote); +-# if MSDOS && defined (_NOORIGSHELL) + else if (s[i] == '"') quote = s[i]; +-# else +- else if (s[i] == '"' || s[i] == '\'') quote = s[i]; ++# if !MSDOS || !defined (_NOORIGSHELL) ++ else if (s[i] == '\'') quote = s[i]; + else if (s[i] == '`') { +- top = i + 1; +- quote = s[i]; ++ if ((bq = 1 - bq)) top = i + 1; + } + # endif + else if (s[i] == '=' || strchr(CMDLINE_DELIM, s[i])) +@@ -1076,13 +1088,6 @@ + putterm(t_bell); + return(0); + } +-# if MSDOS && defined (_NOORIGSHELL) +- quoted = (!quote && cx > 0 && s[cx - 1] == '"') +-# else +- if (quote == '`') quote = '\0'; +- quoted = (!quote && cx > 0 && s[cx - 1] == '"' || s[cx - 1] == '\'') +-# endif +- ? s[cx - 1] : '\0'; + if (comline && top > 0) { + for (i = top - 1; i >= 0; i--) + if (s[i] != ' ' && s[i] != '\t') break; +@@ -1092,6 +1097,14 @@ + cp1 = malloc2(cx - top + 1); + strncpy2(cp1, s + top, cx - top); + cp1 = evalpath(cp1, 1); ++ hasmeta = 0; ++ for (i = 0; cp1[i]; i++) { ++ if (strchr(METACHAR, cp1[i])) { ++ hasmeta = 1; ++ break; ++ } ++ if (iskanji1(cp1, i)) i++; ++ } + + if (selectlist && cont < 0) { + argv = (char **)malloc2(1 * sizeof(char *)); +@@ -1128,13 +1141,11 @@ + } + + cp1 = findcommon(argc, argv); +- fix = 0; +- if (argc == 1 && cp1) { +- if (isdelim(cp1, (int)strlen(cp1) - 1)) fix--; +- else fix++; +- } ++ fix = '\0'; ++ if (argc == 1 && cp1) ++ fix = ((cp2 = strrdelim(cp1, 0)) && !*(cp2 + 1)) ? _SC_ : ' '; + +- if (!cp1 || ((ins = (int)strlen(cp1) - ins) <= 0 && fix <= 0)) { ++ if (!cp1 || ((ins = (int)strlen(cp1) - ins) <= 0 && fix != ' ')) { + if (cont <= 0) { + putterm(t_bell); + l = 0; +@@ -1157,12 +1168,25 @@ + free(argv); + + l = 0; +- if (!quote && !quoted && len < max) { +- for (i = 0; cp1[i]; i++) { +- if (strchr(METACHAR, cp1[i])) break; +- if (iskanji1(cp1, i)) i++; ++ if (!hasmeta) for (i = 0; cp1[i]; i++) { ++ if (strchr(METACHAR, cp1[i])) { ++ hasmeta = 1; ++ break; ++ } ++ if (iskanji1(cp1, i)) i++; ++ } ++ ++ if (hasmeta) { ++ if (quote); ++ else if (quoted) { ++ quote = s[quoted]; ++ setcursor(vlen(s, quoted), plen, max, linemax); ++ deletechar(s, quoted, len, plen, max, linemax, 1); ++ delshift(s, quoted, len--, 1); ++ l--; ++ setcursor(vlen(s, --cx), plen, max, linemax); + } +- if (cp1[i]) { ++ else if (len < max) { + setcursor(vlen(s, top), plen, max, linemax); + insertchar(s, top, len, plen, max, linemax, 1); + insshift(s, top, len++, 1); +@@ -1171,43 +1195,30 @@ + putch2(quote); + setcursor(vlen(s, ++cx), plen, max, linemax); + } ++ else hasmeta = 0; + } + + cp2 = cp1 + (int)strlen(cp1) - ins; +- if (quote && fix < 0 && len + 1 < max) { +- i = insertstr(s, cx, len, plen, +- max, linemax, cp2, ins - 1, quote); +- l += i; ++ if (fix == _SC_) { ++ ins--; ++ if (!hasmeta) quote = '\0'; ++ } ++ i = insertstr(s, cx, len, plen, max, linemax, cp2, ins, quote); ++ l += i; ++ if (fix && (len += i) < max) { + cx += i; +- insertchar(s, cx, len, plen, max, linemax, 1); +- insshift(s, cx, len++, 1); +- l++; +- s[cx++] = quote; +- putcursor(quote, 1); +- insertchar(s, cx, len, plen, max, linemax, 1); +- insshift(s, cx, len, 1); +- l++; +- s[cx] = _SC_; +- putcursor(_SC_, 1); +- } +- else { +- i = insertstr(s, cx, len, plen, max, linemax, cp2, ins, quote); +- l += i; +- if (fix > 0 && (len += i) < max) { +- cx += i; +- if (quote && len + 1 < max) { +- insertchar(s, cx, len, plen, max, linemax, 1); +- insshift(s, cx, len++, 1); +- l++; +- s[cx++] = quote; +- putcursor(quote, 1); +- } ++ if (quote && len + 1 < max) { + insertchar(s, cx, len, plen, max, linemax, 1); +- insshift(s, cx, len, 1); ++ insshift(s, cx, len++, 1); + l++; +- s[cx] = ' '; +- putcursor(' ', 1); ++ s[cx++] = quote; ++ putcursor(quote, 1); + } ++ insertchar(s, cx, len, plen, max, linemax, 1); ++ insshift(s, cx, len, 1); ++ l++; ++ s[cx] = fix; ++ putcursor(fix, 1); + } + + free(cp1); |