276 |
(let* ((letter (match-string 1)) |
(let* ((letter (match-string 1)) |
277 |
(regexp (concat "\\`" letter)) |
(regexp (concat "\\`" letter)) |
278 |
(path (eshell-find-previous-directory regexp))) |
(path (eshell-find-previous-directory regexp))) |
279 |
(concat (or path letter) |
(concat (or path letter) "/")))) |
|
(char-to-string directory-sep-char))))) |
|
280 |
|
|
281 |
(defun eshell-complete-user-reference () |
(defun eshell-complete-user-reference () |
282 |
"If there is a user reference, complete it." |
"If there is a user reference, complete it." |
299 |
(let* ((path default-directory) |
(let* ((path default-directory) |
300 |
(len (length path))) |
(len (length path))) |
301 |
(if (and (> len 1) |
(if (and (> len 1) |
302 |
(eq (aref path (1- len)) directory-sep-char) |
(eq (aref path (1- len)) ?/) |
303 |
(not (and (eshell-under-windows-p) |
(not (and (eshell-under-windows-p) |
304 |
(string-match "\\`[A-Za-z]:[\\\\/]\\'" path)))) |
(string-match "\\`[A-Za-z]:[\\\\/]\\'" path)))) |
305 |
(setq path (substring path 0 (1- (length path))))) |
(setq path (substring path 0 (1- (length path))))) |
323 |
(len (length extra-dots)) |
(len (length extra-dots)) |
324 |
replace-text) |
replace-text) |
325 |
(while (> len 0) |
(while (> len 0) |
326 |
(setq replace-text |
(setq replace-text (concat replace-text "/..") |
|
(concat replace-text |
|
|
(char-to-string directory-sep-char) "..") |
|
327 |
len (1- len))) |
len (1- len))) |
328 |
(setq path |
(setq path |
329 |
(replace-match replace-text t t path 1)))) |
(replace-match replace-text t t path 1)))) |
368 |
(setq path |
(setq path |
369 |
(ring-remove eshell-last-dir-ring |
(ring-remove eshell-last-dir-ring |
370 |
(if index |
(if index |
371 |
(string-to-int index) |
(string-to-number index) |
372 |
0))))) |
0))))) |
373 |
((and path (string-match "^=\\(.*\\)$" path)) |
((and path (string-match "^=\\(.*\\)$" path)) |
374 |
(let ((oldpath (eshell-find-previous-directory |
(let ((oldpath (eshell-find-previous-directory |