bugLiberty Eiffel - Bugs: bug #65309, Pretty considers unix-style...

 
 

bug #65309: Pretty considers unix-style absolute paths flags

Submitter:  Jakub Pavlík <igneus>
Submitted:  Tue 13 Feb 2024 10:46:51 PM UTC
   
 
Category:  Liberty tools Severity:  3 - Normal
Priority:  * 5 - Normal Status:  None
Assigned to:  Tybor Open/Closed:  Open
Release:  None Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 12 May 2024 04:49:24 PM UTC, comment #4: 


comment #3:

>
> comment #2:
> > Ramack, I would like to know what do you feel about it.
>
> You know I am a big fan of backward compatibility, but in this case I'd not argue against annoying all our windows users (and make them happy in the same time).


Ok, let's go to remove the slash as allowed prefix for options.
I will also update the wiki and the manpages.

Paolo Redaelli <Tybor>
Group administrator
Mon 19 Feb 2024 07:39:19 PM UTC, comment #3: 


comment #2:

> Ramack, I would like to know what do you feel about it.


You know I am a big fan of backward compatibility, but in this case I'd not argue against annoying all our windows users (and make them happy in the same time).

(you remember the arguing over the empty set from the logic course?)

Raphael Mack <ramack>
Group administrator
Sun 18 Feb 2024 11:04:10 PM UTC, comment #2: 

I've found a terrible hack to get around this bug, but I'm pretty tempted to remove the "/flag" syntax and keep only "-this" and "--that" POSIX-ish convention.

Ramack, I would like to know what do you feel about it.

Windows is progressively becoming "more POSIXish", so I suspect that asking Windows developer to write pretty -zen foo.e instead of pretty /zen foo.e is not such a dramatic requirement.

Paolo Redaelli <Tybor>
Group administrator
Sat 17 Feb 2024 10:10:49 PM UTC, comment #1: 


original submission:

> I do remember command line flags beginning with a slash from MS-DOS, but on unix-like systems programs accepting filesystem paths should not confuse absolute paths with flags. Or, if they for some reason really need to, they should at least respect the -- convention ( "--" meaning end of flags, beginning of arguments, regardless their possible flag-like appearance).

You do remember correctly. All Liberty commands allows options and flags to be prefixed by either "/", "-" and "--".

A feasible solution is to limit the "/" prefix to Windows systems and "-" and "--" to POSIX (Linux, BSD, MacOS)

Paolo Redaelli <Tybor>
Group administrator
Tue 13 Feb 2024 10:46:51 PM UTC, original submission:  

```
$ se pretty /absolute/path/file.e
**** Fatal Error: pretty: unknown flag: "/absolute/path/file.e"


------
```

Because COMMAND_LINE_TOOLS.is_some_flag() is called and returns true for any argument beginning with a slash.

That's really counter-intuitive. Is there some good reason for this behavior?

I do remember command line flags beginning with a slash from MS-DOS, but on unix-like systems programs accepting filesystem paths should not confuse absolute paths with flags. Or, if they for some reason really need to, they should at least respect the -- convention ( "--" meaning end of flags, beginning of arguments, regardless their possible flag-like appearance).

Jakub Pavlík <igneus>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ramack (Posted a comment)
  • -email is unavailable- added by Tybor (Posted a comment)
  • -email is unavailable- added by igneus (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-02-18 Tybor Assigned toNone Tybor

    Back to the top

    Powered by Savane 3.13-0159.
    Corresponding source code