You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "YunFeng Ma (JIRA)" <ji...@apache.org> on 2008/05/29 08:56:44 UTC

[jira] Created: (GSHELL-117) GShell doesn't support "\" in the path in Widnows platform

GShell doesn't support "\" in the path in Widnows platform
----------------------------------------------------------

                 Key: GSHELL-117
                 URL: https://issues.apache.org/jira/browse/GSHELL-117
             Project: GShell
          Issue Type: Bug
      Security Level: public (Regular issues)
          Components: CLI
    Affects Versions: 1.0-alpha-1, 1.0-alpha-2
         Environment: Windows
            Reporter: YunFeng Ma
            Assignee: Jason Dillon
             Fix For: 1.0-alpha-2, 1.0-alpha-3


Run the following command and get errors in Windows
{noformat}
deploy/deploy H:\FTP_ROOT\Build\cviewer.war
ERROR TokenMgrError: Lexical error at line 1, column 18.  Encountered: "F" (70), after : "\\"
{noformat}

It works fine for double slash:
deploy/deploy H:\\FTP_ROOT\\Build\\cviewer.war

It's not convenience for windows users.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GSHELL-117) GShell doesn't support "\" in the path in Widnows platform

Posted by "Jason Dillon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GSHELL-117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12606681#action_12606681 ] 

Jason Dillon commented on GSHELL-117:
-------------------------------------

Yes, most certainly there is work left to be done on the interactive shell, especially related to the syntax parser.

> GShell doesn't support "\" in the path in Widnows platform
> ----------------------------------------------------------
>
>                 Key: GSHELL-117
>                 URL: https://issues.apache.org/jira/browse/GSHELL-117
>             Project: GShell
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: CLI
>    Affects Versions: 1.0-alpha-1, 1.0-alpha-2
>         Environment: Windows
>            Reporter: YunFeng Ma
>            Assignee: Jason Dillon
>             Fix For: 1.0-alpha-3
>
>
> Run the following command and get errors in Windows
> {noformat}
> deploy/deploy H:\FTP_ROOT\Build\cviewer.war
> ERROR TokenMgrError: Lexical error at line 1, column 18.  Encountered: "F" (70), after : "\\"
> {noformat}
> It works fine for double slash:
> deploy/deploy H:\\FTP_ROOT\\Build\\cviewer.war
> It's not convenience for windows users.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GSHELL-117) GShell doesn't support "\" in the path in Widnows platform

Posted by "Jason Dillon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GSHELL-117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601006#action_12601006 ] 

Jason Dillon commented on GSHELL-117:
-------------------------------------

Does it work with the windows path in quotes (single and/or double)?

> GShell doesn't support "\" in the path in Widnows platform
> ----------------------------------------------------------
>
>                 Key: GSHELL-117
>                 URL: https://issues.apache.org/jira/browse/GSHELL-117
>             Project: GShell
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: CLI
>    Affects Versions: 1.0-alpha-1, 1.0-alpha-2
>         Environment: Windows
>            Reporter: YunFeng Ma
>            Assignee: Jason Dillon
>             Fix For: 1.0-alpha-2, 1.0-alpha-3
>
>
> Run the following command and get errors in Windows
> {noformat}
> deploy/deploy H:\FTP_ROOT\Build\cviewer.war
> ERROR TokenMgrError: Lexical error at line 1, column 18.  Encountered: "F" (70), after : "\\"
> {noformat}
> It works fine for double slash:
> deploy/deploy H:\\FTP_ROOT\\Build\\cviewer.war
> It's not convenience for windows users.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GSHELL-117) GShell doesn't support "\" in the path in Widnows platform

Posted by "Jason Warner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GSHELL-117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12606412#action_12606412 ] 

Jason Warner commented on GSHELL-117:
-------------------------------------

I'm not sure if that would work or not.  The error occurs during parsing of the command line, which occurs before gshell attempts to determine what the command is or what arguments are present.  Any character replacement would have to be done blindly, without any knowledge of context.  I'm not familiar enough with all the use cases of gshell to accurately predict whether this could cause failures in certain situations or not.  Alternatively, we could have a check for the specific commands in which a file name could be provided and have preparsing done before the command reaches the parser on just those commands.  That seems like a really large hack, though, and is really not a solution in my mind, although it's probably the easiest solution to implement that has the least chance of breaking other commands.  I'm having trouble coming up with a fix that I'd personally be comfortable with short of figuring out just what the parser hates so much about '\' and teaching it how to play nice.  I'm not familiar enough with the parser to estimate how difficult that would be.  Maybe someone who is more familiar with the parser or gshell as a whole could comment on that, or anything else I just said for that matter.  

> GShell doesn't support "\" in the path in Widnows platform
> ----------------------------------------------------------
>
>                 Key: GSHELL-117
>                 URL: https://issues.apache.org/jira/browse/GSHELL-117
>             Project: GShell
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: CLI
>    Affects Versions: 1.0-alpha-1, 1.0-alpha-2
>         Environment: Windows
>            Reporter: YunFeng Ma
>            Assignee: Jason Dillon
>             Fix For: 1.0-alpha-3
>
>
> Run the following command and get errors in Windows
> {noformat}
> deploy/deploy H:\FTP_ROOT\Build\cviewer.war
> ERROR TokenMgrError: Lexical error at line 1, column 18.  Encountered: "F" (70), after : "\\"
> {noformat}
> It works fine for double slash:
> deploy/deploy H:\\FTP_ROOT\\Build\\cviewer.war
> It's not convenience for windows users.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (GSHELL-117) GShell doesn't support "\" in the path in Widnows platform

Posted by "Jason Dillon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GSHELL-117?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason Dillon updated GSHELL-117:
--------------------------------

    Fix Version/s:     (was: 1.0-alpha-2)

> GShell doesn't support "\" in the path in Widnows platform
> ----------------------------------------------------------
>
>                 Key: GSHELL-117
>                 URL: https://issues.apache.org/jira/browse/GSHELL-117
>             Project: GShell
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: CLI
>    Affects Versions: 1.0-alpha-1, 1.0-alpha-2
>         Environment: Windows
>            Reporter: YunFeng Ma
>            Assignee: Jason Dillon
>             Fix For: 1.0-alpha-3
>
>
> Run the following command and get errors in Windows
> {noformat}
> deploy/deploy H:\FTP_ROOT\Build\cviewer.war
> ERROR TokenMgrError: Lexical error at line 1, column 18.  Encountered: "F" (70), after : "\\"
> {noformat}
> It works fine for double slash:
> deploy/deploy H:\\FTP_ROOT\\Build\\cviewer.war
> It's not convenience for windows users.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GSHELL-117) GShell doesn't support "\" in the path in Widnows platform

Posted by "Kevan Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GSHELL-117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12605960#action_12605960 ] 

Kevan Miller commented on GSHELL-117:
-------------------------------------

There must be something we can do for this. 

IIUC, either of the following would work:

deploy/deploy H:\\FTP_ROOT\\Build\\cviewer.war

or

deploy/deploy H:/FTP_ROOT/Build/cviewer.war

I'd much prefer a native-windows solution. A native windows path (e.g. H:\FTP_ROOT\Build\cviewer.war) should work. Can we detect a windows environment and perform some simple substitutions? '\' -> '\\' or '\' -> '/'

> GShell doesn't support "\" in the path in Widnows platform
> ----------------------------------------------------------
>
>                 Key: GSHELL-117
>                 URL: https://issues.apache.org/jira/browse/GSHELL-117
>             Project: GShell
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: CLI
>    Affects Versions: 1.0-alpha-1, 1.0-alpha-2
>         Environment: Windows
>            Reporter: YunFeng Ma
>            Assignee: Jason Dillon
>             Fix For: 1.0-alpha-3
>
>
> Run the following command and get errors in Windows
> {noformat}
> deploy/deploy H:\FTP_ROOT\Build\cviewer.war
> ERROR TokenMgrError: Lexical error at line 1, column 18.  Encountered: "F" (70), after : "\\"
> {noformat}
> It works fine for double slash:
> deploy/deploy H:\\FTP_ROOT\\Build\\cviewer.war
> It's not convenience for windows users.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GSHELL-117) GShell doesn't support "\" in the path in Widnows platform

Posted by "Jason Dillon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GSHELL-117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12604320#action_12604320 ] 

Jason Dillon commented on GSHELL-117:
-------------------------------------

FYI, this is because the JavaCC gshell-parser's string handling is based on the JavaCC java parsers string handling...

> GShell doesn't support "\" in the path in Widnows platform
> ----------------------------------------------------------
>
>                 Key: GSHELL-117
>                 URL: https://issues.apache.org/jira/browse/GSHELL-117
>             Project: GShell
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: CLI
>    Affects Versions: 1.0-alpha-1, 1.0-alpha-2
>         Environment: Windows
>            Reporter: YunFeng Ma
>            Assignee: Jason Dillon
>             Fix For: 1.0-alpha-3
>
>
> Run the following command and get errors in Windows
> {noformat}
> deploy/deploy H:\FTP_ROOT\Build\cviewer.war
> ERROR TokenMgrError: Lexical error at line 1, column 18.  Encountered: "F" (70), after : "\\"
> {noformat}
> It works fine for double slash:
> deploy/deploy H:\\FTP_ROOT\\Build\\cviewer.war
> It's not convenience for windows users.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GSHELL-117) GShell doesn't support "\" in the path in Widnows platform

Posted by "Jason Dillon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GSHELL-117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12606499#action_12606499 ] 

Jason Dillon commented on GSHELL-117:
-------------------------------------

This should only be a problem when running the interactive shell, which isn't really ready for production use yet.

But from the platform command line this should work fine:

{noformat}
gsh.bat deploy/deploy H:\FTP_ROOT\Build\cviewer.war
{noformat}

The above does not invoke the parser, as the tokens are already split up into a String[] for the main() invoke.

However, using the -c flag would not:

{noformat}
gsh.bat -c "deploy/deploy H:\FTP_ROOT\Build\cviewer.war"
{noformat}

Because this will cause the parser to be used to tokenize the input.

> GShell doesn't support "\" in the path in Widnows platform
> ----------------------------------------------------------
>
>                 Key: GSHELL-117
>                 URL: https://issues.apache.org/jira/browse/GSHELL-117
>             Project: GShell
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: CLI
>    Affects Versions: 1.0-alpha-1, 1.0-alpha-2
>         Environment: Windows
>            Reporter: YunFeng Ma
>            Assignee: Jason Dillon
>             Fix For: 1.0-alpha-3
>
>
> Run the following command and get errors in Windows
> {noformat}
> deploy/deploy H:\FTP_ROOT\Build\cviewer.war
> ERROR TokenMgrError: Lexical error at line 1, column 18.  Encountered: "F" (70), after : "\\"
> {noformat}
> It works fine for double slash:
> deploy/deploy H:\\FTP_ROOT\\Build\\cviewer.war
> It's not convenience for windows users.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (GSHELL-117) GShell doesn't support "\" in the path in Widnows platform

Posted by "Forrest Xia (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GSHELL-117?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Forrest Xia resolved GSHELL-117.
--------------------------------

    Resolution: Won't Fix

there is a workaround for this problem, user can use double quote to avoid it.

> GShell doesn't support "\" in the path in Widnows platform
> ----------------------------------------------------------
>
>                 Key: GSHELL-117
>                 URL: https://issues.apache.org/jira/browse/GSHELL-117
>             Project: GShell
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: CLI
>    Affects Versions: 1.0-alpha-1, 1.0-alpha-2
>         Environment: Windows
>            Reporter: YunFeng Ma
>            Assignee: Jason Dillon
>             Fix For: 1.0-alpha-3
>
>
> Run the following command and get errors in Windows
> {noformat}
> deploy/deploy H:\FTP_ROOT\Build\cviewer.war
> ERROR TokenMgrError: Lexical error at line 1, column 18.  Encountered: "F" (70), after : "\\"
> {noformat}
> It works fine for double slash:
> deploy/deploy H:\\FTP_ROOT\\Build\\cviewer.war
> It's not convenience for windows users.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GSHELL-117) GShell doesn't support "\" in the path in Widnows platform

Posted by "Kevan Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GSHELL-117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12606534#action_12606534 ] 

Kevan Miller commented on GSHELL-117:
-------------------------------------

Interesting. Didn't realize that the command line would be parsed differently than the interactive shell. That certainly helps.

So you can pass native window paths on the command line or use "\\" or "/" in the interactive shell. Sounds good. Agreed that we should recommend command line execution. Looks like we have some work to get a fully-functional interactive shell...

> GShell doesn't support "\" in the path in Widnows platform
> ----------------------------------------------------------
>
>                 Key: GSHELL-117
>                 URL: https://issues.apache.org/jira/browse/GSHELL-117
>             Project: GShell
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: CLI
>    Affects Versions: 1.0-alpha-1, 1.0-alpha-2
>         Environment: Windows
>            Reporter: YunFeng Ma
>            Assignee: Jason Dillon
>             Fix For: 1.0-alpha-3
>
>
> Run the following command and get errors in Windows
> {noformat}
> deploy/deploy H:\FTP_ROOT\Build\cviewer.war
> ERROR TokenMgrError: Lexical error at line 1, column 18.  Encountered: "F" (70), after : "\\"
> {noformat}
> It works fine for double slash:
> deploy/deploy H:\\FTP_ROOT\\Build\\cviewer.war
> It's not convenience for windows users.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GSHELL-117) GShell doesn't support "\" in the path in Widnows platform

Posted by "Jason Warner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GSHELL-117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12604022#action_12604022 ] 

Jason Warner commented on GSHELL-117:
-------------------------------------

I looked at this issue briefly for Geronimo-4106 before I noticed this issue.  I checked the use of both single and double quotes and noted that neither resolved the issue.  Forward slashes can be used instead of backslashes to get this to work properly.

> GShell doesn't support "\" in the path in Widnows platform
> ----------------------------------------------------------
>
>                 Key: GSHELL-117
>                 URL: https://issues.apache.org/jira/browse/GSHELL-117
>             Project: GShell
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: CLI
>    Affects Versions: 1.0-alpha-1, 1.0-alpha-2
>         Environment: Windows
>            Reporter: YunFeng Ma
>            Assignee: Jason Dillon
>             Fix For: 1.0-alpha-3
>
>
> Run the following command and get errors in Windows
> {noformat}
> deploy/deploy H:\FTP_ROOT\Build\cviewer.war
> ERROR TokenMgrError: Lexical error at line 1, column 18.  Encountered: "F" (70), after : "\\"
> {noformat}
> It works fine for double slash:
> deploy/deploy H:\\FTP_ROOT\\Build\\cviewer.war
> It's not convenience for windows users.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.