2
1

bash30-010 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. *** bash-3.0/bashline.c Mon Jul 5 23:22:12 2004
  2. --- bash/bashline.c Thu Sep 2 16:00:12 2004
  3. ***************
  4. *** 101,104 ****
  5. --- 101,105 ----
  6. /* Helper functions for Readline. */
  7. + static int bash_directory_expansion __P((char **));
  8. static int bash_directory_completion_hook __P((char **));
  9. static int filename_completion_ignore __P((char **));
  10. ***************
  11. *** 293,297 ****
  12. at = strchr (rl_completer_word_break_characters, '@');
  13. if ((at == 0 && on_or_off == 0) || (at != 0 && on_or_off != 0))
  14. ! return;
  15. /* We have something to do. Do it. */
  16. --- 294,298 ----
  17. at = strchr (rl_completer_word_break_characters, '@');
  18. if ((at == 0 && on_or_off == 0) || (at != 0 && on_or_off != 0))
  19. ! return old_value;
  20. /* We have something to do. Do it. */
  21. ***************
  22. *** 1407,1414 ****
  23. if (*hint_text == '~')
  24. {
  25. ! int l, tl, vl;
  26. vl = strlen (val);
  27. tl = strlen (hint_text);
  28. l = vl - hint_len; /* # of chars added */
  29. temp = (char *)xmalloc (l + 2 + tl);
  30. strcpy (temp, hint_text);
  31. --- 1408,1424 ----
  32. if (*hint_text == '~')
  33. {
  34. ! int l, tl, vl, dl;
  35. ! char *rd;
  36. vl = strlen (val);
  37. tl = strlen (hint_text);
  38. + #if 0
  39. l = vl - hint_len; /* # of chars added */
  40. + #else
  41. + rd = savestring (filename_hint);
  42. + bash_directory_expansion (&rd);
  43. + dl = strlen (rd);
  44. + l = vl - dl; /* # of chars added */
  45. + free (rd);
  46. + #endif
  47. temp = (char *)xmalloc (l + 2 + tl);
  48. strcpy (temp, hint_text);
  49. ***************
  50. *** 2188,2191 ****
  51. --- 2198,2222 ----
  52. }
  53. + /* Simulate the expansions that will be performed by
  54. + rl_filename_completion_function. This must be called with the address of
  55. + a pointer to malloc'd memory. */
  56. + static int
  57. + bash_directory_expansion (dirname)
  58. + char **dirname;
  59. + {
  60. + char *d;
  61. +
  62. + d = savestring (*dirname);
  63. +
  64. + if (rl_directory_rewrite_hook)
  65. + (*rl_directory_rewrite_hook) (&d);
  66. +
  67. + if (rl_directory_completion_hook && (*rl_directory_completion_hook) (&d))
  68. + {
  69. + free (*dirname);
  70. + *dirname = d;
  71. + }
  72. + }
  73. +
  74. /* Handle symbolic link references and other directory name
  75. expansions while hacking completion. */
  76. *** bash-3.0/patchlevel.h Wed Aug 22 08:05:39 2001
  77. --- bash/patchlevel.h Thu Sep 2 15:04:32 2004
  78. ***************
  79. *** 26,30 ****
  80. looks for to find the patch level (for the sccs version string). */
  81. ! #define PATCHLEVEL 9
  82. #endif /* _PATCHLEVEL_H_ */
  83. --- 26,30 ----
  84. looks for to find the patch level (for the sccs version string). */
  85. ! #define PATCHLEVEL 10
  86. #endif /* _PATCHLEVEL_H_ */