Bug 1258410 - [RFE] treat trailing slash in directory names for rsync distinctly
Summary: [RFE] treat trailing slash in directory names for rsync distinctly
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: bash-completion
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Siteshwar Vashisht
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-31 10:18 UTC by Suvayu
Modified: 2025-02-14 15:46 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-02-14 15:46:37 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Suvayu 2015-08-31 10:18:08 UTC
Description of problem:
Rsync famously distinguishes between a trailing slash in source directory names compared to without the slash.  When using bash-completion however, the completion ignores that a directory name without a trailing slash is a distinctly valid candidate.  It would be very useful if the completion for rsync can make this distinction.

Version-Release number of selected component (if applicable):
all

How reproducible:
always

Steps to Reproduce:
1. Create a test directory structure
   $ mkdir -p foo{1,2}
   $ touch foo{1,2}/{bar,baz}
2. Try to complete with foo1 as source, and foo2 as destination

Actual results:
$ rsync -r foo [TAB] [TAB]
foo1/  foo2/

$ rsync -r foo1 [TAB]
$ rsync -r foo1/

Expected results:
Since in the first case foo1, foo1/, foo2, foo2/, and in the second case foo1 and foo1/, are distinctly different candidates, I propose bash-completion for rsync distinguish between them.

$ rsync -r foo [TAB] [TAB]
foo1  foo1/  foo2  foo2/

$ rsync -r foo1 [TAB]
foo1  foo1/

Additional info:
I realise this request is probably not easy, and has the potential to lead to messy code.  But having it would be a great enhancement for rsync users, specially novices, and experienced users with a faltering mind ;).


Note You need to log in before you can comment on or make changes to this bug.