mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-24 17:16:12 +01:00
osc ls . (shortcut for PROJECT PACKAGE from current dir.)
This commit is contained in:
parent
b8c3a23b90
commit
022578925b
@ -236,6 +236,7 @@ class Osc(cmdln.Cmdln):
|
||||
Examples for listing sources:
|
||||
ls # list all projects (deprecated)
|
||||
ls / # list all projects
|
||||
ls . # take PROJECT/PACKAGE from current dir.
|
||||
ls PROJECT # list packages in a project
|
||||
ls PROJECT PACKAGE # list source files of package of a project
|
||||
ls PROJECT PACKAGE <file> # list <file> if this file exists
|
||||
@ -274,12 +275,19 @@ class Osc(cmdln.Cmdln):
|
||||
fname = None
|
||||
if len(args) == 0:
|
||||
# For consistency with *all* other commands
|
||||
# this list what the server has in the current wd.
|
||||
# this lists what the server has in the current wd.
|
||||
# CAUTION: 'osc ls -b' already works like this.
|
||||
pass
|
||||
if len(args) > 0:
|
||||
project = args[0]
|
||||
if project == '/': project = None
|
||||
if project == '.':
|
||||
cwd = os.getcwd()
|
||||
if is_project_dir(cwd):
|
||||
project = store_read_project(cwd)
|
||||
elif is_package_dir(cwd):
|
||||
project = store_read_project(cwd)
|
||||
package = store_read_package(cwd)
|
||||
if len(args) > 1:
|
||||
package = args[1]
|
||||
if opts.deleted:
|
||||
|
Loading…
Reference in New Issue
Block a user