1 jw, Tue Oct 20 22:09:16 CEST 2009
3 This is a feature suggestion for easier osc commandline handling.
4 Many commands require specifying Project and/or Package names.
6 The current situation is not satisfying for the following reasons:
7 - inconsistent defaults. Some osc subcommands can take project
8 and/or package names from the current directory, if run inside a checkout
9 tree. If both project and package can use this default or only one, and if
10 one, which, depends on the command. Users have a hard time memorizing
12 Examples as of osc version 0.123:
13 osc maintainer PRJ [PKG]
14 - does not look in the current directory.
17 - Never looks at the current directory.
18 - lists all projects, if run without parameters.
19 osc checkout [PRJ] PKG
21 - takes project from current directory, if inside a checkout tree
22 - else operates on an entire project.
24 - defaults to current project and package,
25 - if arg is a subdirectory, project is taken from current directory
26 - if arg is a file, both project and package are taken from current
29 - takes either both or none from current directory.
30 - many commands do not look into the current directory,
31 they are cumbersome to use.
32 - sometimes PRJ/PKG can be used instead of PRJ PKG
38 Instead of tuning (maybe optional) positional parameters.
39 We suggest to deprecate this syntax over time and instead favour an alternate
41 osc CMD ... [--prj PRJ] [--pkg PKG] ...
42 osc CMD ... [--proj PRJ] [--pack PKG] ...
43 osc CMD ... [--project PRJ] [--package PKG] ...
45 These six options are new to osc, currently no existing command uses
46 them. Thus the new syntax is conflict free wit the old syntax, both can be
49 --prj, --proj, --project are synonyms.
50 --pkg, --pack, --package are synonyms.
52 osc shall support aliases, to save typing. Some implicit aliases exist,
53 with well defined magic effects. Aliases substitution is literal.
54 They can replace options including their parameters, or just the option, or
56 - (a dash) expands to --prj openSUSE:Factory
57 (or --prj followed by any other project as defined in
58 ~/.oscrc:default_project )
59 --prj - is synonymous to just -, for consistency.
61 . (a dot) evaluates the current working directory, searching for
62 .osc/_apiurl, .osc/_project, and .osc/_package
63 Implicit --apiurl, --prj, or --pkg options are constructed as far
64 as available from the current directory and as far as not already
65 present in the command line.
66 If a dot is used as parameter to an option, it has a more
67 deterministic meaning.
68 --apiurl . Substitute only the current apiurl,
69 --prj . Substitute the current project name, and provides
70 a default for --apiurl unless given.
71 --pkg . Substitures current package name likewise.
73 ./. expands to --prj . --pkg .
74 ./PKG expands to --prj . --pkg PKG
76 Unless otherwise noted in the online help, magic aliases are only attempted onceper commandline, and will only apply to their respective options.
77 E.g. osc ci -m - will use a simple '-' as check in messages, and the absence of any project or package will default to the current project or package, just as
78 osc ci . -m - would do.
80 Additionally, user defined aliases can be added to ~/.oscrc
81 If an alias expansion has effect on the command line, the expanded line is
82 printed as debug output.
84 online help of osc commands shall refer to the above syntax like this:
88 An additional help entry
92 shall explain the relevant details as presented herein.