File: bash30-013.dpatch

package info (click to toggle)
bash3 3.0-12
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,736 kB
  • ctags: 34
  • sloc: sh: 3,053; makefile: 408
file content (105 lines) | stat: -rw-r--r-- 2,416 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#! /bin/sh -e

if [ $# -eq 3 -a "$2" = '-d' ]; then
    pdir="-d $3"
elif [ $# -ne 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi
case "$1" in
    -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
    *)
	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
	exit 1
esac
exit 0

# DP: upstream patch bash30-013

			     BASH PATCH REPORT
			     =================

Bash-Release: 3.0
Patch-ID: bash30-013

Bug-Reported-by: Len Lattanzi <llattanzi@apple.com>
Bug-Reference-ID: <556CE1CE-E1AC-11D8-A2D9-00039383EC60@apple.com>
Bug-Reference-URL:

Bug-Description:

vi-mode filename completion/glob expansion should understand and perform
tilde expansion.

Patch:

*** ../bash-3.0/bashline.c	Mon Jul  5 23:22:12 2004
--- bashline.c	Thu Sep  2 16:00:12 2004
***************
*** 2514,2518 ****
    static int ind;
    int glen;
!   char *ret;
  
    if (state == 0)
--- 2545,2549 ----
    static int ind;
    int glen;
!   char *ret, *ttext;
  
    if (state == 0)
***************
*** 2524,2538 ****
        FREE (globtext);
  
        if (rl_explicit_arg)
  	{
! 	  globorig = savestring (text);
! 	  glen = strlen (text);
  	  globtext = (char *)xmalloc (glen + 2);
! 	  strcpy (globtext, text);
  	  globtext[glen] = '*';
  	  globtext[glen+1] = '\0';
  	}
        else
!         globtext = globorig = savestring (text);
  
        matches = shell_glob_filename (globtext);
--- 2555,2574 ----
        FREE (globtext);
  
+       ttext = bash_tilde_expand (text, 0);
+ 
        if (rl_explicit_arg)
  	{
! 	  globorig = savestring (ttext);
! 	  glen = strlen (ttext);
  	  globtext = (char *)xmalloc (glen + 2);
! 	  strcpy (globtext, ttext);
  	  globtext[glen] = '*';
  	  globtext[glen+1] = '\0';
  	}
        else
!         globtext = globorig = savestring (ttext);
! 
!       if (ttext != text)
! 	free (ttext);
  
        matches = shell_glob_filename (globtext);

*** ../bash-3.0/patchlevel.h	Wed Aug 22 08:05:39 2001
--- patchlevel.h	Thu Sep  2 15:04:32 2004
***************
*** 26,30 ****
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 12
  
  #endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 13
  
  #endif /* _PATCHLEVEL_H_ */