Modify ↓
Opened 20 years ago
Closed 18 years ago
#994 closed defect (fixed)
\ must be enclosed in quotes
Reported by: | pLu | Owned by: | Matthew Good |
---|---|---|---|
Priority: | lowest | Milestone: | 0.10 |
Component: | admin/console | Version: | 0.8 |
Severity: | normal | Keywords: | interactive escaping |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Example:
component chown "My Component" DOMAIN\login
Results in:
Name Owner ------------------------------- My Component DOMAINlogin
I'm using Python 2.3.4 on Windows.
Attachments (0)
Change History (3)
comment:1 by , 20 years ago
Keywords: | interactive escaping added; windows removed |
---|
comment:2 by , 18 years ago
Milestone: | → 0.10 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
This is the standard behavior of the Python cmd
module that trac-admin uses, but I agree that it doesn't seem necessary for this use.
Note:
See TracTickets
for help on using tickets.
It's not a bug, and it isn't windows-only, it's the way interactive trac-admin handles escapes. Easier than wrapping everything in quotes is to use double \'s:
If used as a command-line argument I don't think it needs to be escaped, but I only have a bash shell to test on and that has its own escaping. I think
DOMAIN\\login
on the command line should have its escapes handled by the shell and passed on to trac-admin as justDOMAIN\login
, which works (that is, typingDOMAIN\\\\login
is not necessary). My understanding of how the shell handles escapes is quite likely wrong, butecho -E DOMAIN\\login
does outputDOMAIN\login
.Whether this functionality is desirable is debatable. It's minor, but IMHO it's more bug than feature because I can't think of a single valid use of an escape in trac-admin; the only escapable character I can think of that won't be thrown out is a quotation mark which is useless and less likely to occur than the escape character itself (especially with NTLM authentication being used). Plus, if escapes are removed, quotes will still be inputable if wrapped in a differing quote type. This already works:
Oh, and I guess somebody in the world might have used it once to escape a space instead of wrapping the words in quotes.