viper-framework / viper

Binary analysis and management framework
Other
1.54k stars 353 forks source link

add a "default" entry to project --list #659

Closed frennkie closed 6 years ago

frennkie commented 6 years ago

I have always found it a bit confusing that project --list does not include the default project.

This PR changes the display from

$: ./viper-cli
         _
        (_)
   _   _ _ ____  _____  ____
  | | | | |  _ \| ___ |/ ___)
   \ V /| | |_| | ____| |
    \_/ |_|  __/|_____)_| v2.0-dev
          |_|

You have 4 files in your default repository
viper > projects -l
[*] Projects Available:
+--------------+--------------------------+---------+
| Project Name | Creation Time            | Current |
+--------------+--------------------------+---------+
| caseB        | Wed Feb 21 19:51:17 2018 |         |
| foobar       | Wed Feb 21 20:09:55 2018 |         |
| caseXYZ      | Wed Feb 21 20:09:50 2018 |         |
| barfoo       | Wed Feb 21 20:09:58 2018 |         |
| project      | Wed Feb 21 20:10:04 2018 |         |
| caseA        | Wed Feb 21 19:51:13 2018 |         |
+--------------+--------------------------+---------+
viper > projects -s caseXYZ
[*] Switched to project caseXYZ
caseXYZ viper > projects -l
[*] Projects Available:
+--------------+--------------------------+---------+
| Project Name | Creation Time            | Current |
+--------------+--------------------------+---------+
| caseB        | Wed Feb 21 19:51:17 2018 |         |
| foobar       | Wed Feb 21 20:09:55 2018 |         |
| caseXYZ      | Wed Feb 21 20:09:50 2018 | Yes     |
| barfoo       | Wed Feb 21 20:09:58 2018 |         |
| project      | Wed Feb 21 20:10:04 2018 |         |
| caseA        | Wed Feb 21 19:51:13 2018 |         |
+--------------+--------------------------+---------+
caseXYZ viper >

to

$: ./viper-cli
         _
        (_)
   _   _ _ ____  _____  ____
  | | | | |  _ \| ___ |/ ___)
   \ V /| | |_| | ____| |
    \_/ |_|  __/|_____)_| v2.0-dev
          |_|

You have 4 files in your default repository
viper > projects -l
[*] Projects Available:
+--------------+--------------------------+---------+
| Project Name | Creation Time            | Current |
+--------------+--------------------------+---------+
| # default #  | Wed Feb 21 20:10:29 2018 | Yes     |
|              |                          |         |
| barfoo       | Wed Feb 21 20:09:58 2018 |         |
| caseA        | Wed Feb 21 19:51:13 2018 |         |
| caseB        | Wed Feb 21 19:51:17 2018 |         |
| caseXYZ      | Wed Feb 21 20:09:50 2018 |         |
| foobar       | Wed Feb 21 20:09:55 2018 |         |
| project      | Wed Feb 21 20:10:04 2018 |         |
+--------------+--------------------------+---------+
viper > projects -s caseXYZ
[*] Switched to project caseXYZ
caseXYZ viper > projects -l
[*] Projects Available:
+--------------+--------------------------+---------+
| Project Name | Creation Time            | Current |
+--------------+--------------------------+---------+
| # default #  | Wed Feb 21 20:10:29 2018 |         |
|              |                          |         |
| barfoo       | Wed Feb 21 20:09:58 2018 |         |
| caseA        | Wed Feb 21 19:51:13 2018 |         |
| caseB        | Wed Feb 21 19:51:17 2018 |         |
| caseXYZ      | Wed Feb 21 20:09:50 2018 | Yes     |
| foobar       | Wed Feb 21 20:09:55 2018 |         |
| project      | Wed Feb 21 20:10:04 2018 |         |
+--------------+--------------------------+---------+
caseXYZ viper >
frennkie commented 6 years ago

Not sure about the two "#" characters...

The blank line is intended as a visual separation from the actual projects.

botherder commented 6 years ago

I'm not sure about this one. The idea of the default was rather than being a default project, to not be considered a project at all. I think this kinda confuses that notion.

frennkie commented 6 years ago

Well, as I stated: coming newly to Viper last year I found this confusing... but maybe I just didn't look into the documentation closely enough.

Should I close this PR (fine with me) or would you want to wait for feedback from others?

frennkie commented 6 years ago

No one else seems to be in favor of this.. so I close the PR.

botherder commented 6 years ago

I would have waited for some more feedback, but indeed it's been lingering for too long.