si setprefs
sets preferences
Synopsis
si setprefs [--command=value] [--[no]resetToDefault] [--[no]save] [--[no]ask] [--ui=[unspecified|gui|cli|api]] [(-?|--usage)] [(-F file|--selectionFile=file)] [(-N|--no)] [(-Y|--yes)] [--[no]batch] [--cwd=directory] [--forceConfirm=[yes|no]] pref[=value]...
Description
si setprefs sets preferences and configuration options. These settings are used to determine default behaviors for other commands - each option on each command has a preference key associated with it. The
si viewprefs command lists the commands and preference keys. Changes to your preferences are either for the current client session (until
si exit is used) or may be permanently saved in your system's
home directory, into a file named
Integrity, using the
--save option.
To permanently enable keyword expansion when resynchronizing members, for example, you would specify:
si setprefs --command=resync --save keywordExpand=expand
Your administrator can also lock certain preferences from the
PTC RV&S Server, preventing you from configuring them using the
si setprefs command. Preferences that are locked -- viewable with
si viewprefs -- display (locked) at the end of the output line. The following preferences can be locked from the server by editing
PTC RV&S policies in the Administration Client:
|
Tip: For information on editing PTC RV&S policies, see the PTC RV&S Help Center.
|
Preference
|
Affected Commands
|
branchIfVariant
|
|
breakLock
|
|
changePackageID
|
|
moveLock
|
|
onExistingArchive
|
|
restoreTimestamp
|
|
retainWorkingFile
|
|
saveTimestamp
|
|
sparse
|
|
updateMemberRev
|
|
|
Do not edit the IntegrityClient.rc file manually, because preferences that appear more than once in the IntegrityClient.rc file can cause PTC RV&S to behave unpredictably.
|
Options
This command takes the universal options available to all
si commands, as well as some general options. See the
options reference page for descriptions.
• --command=value
identifies the command to be set. For an easy way to see a list of commands and values that may be set, simply type the
si viewprefs command, either piped through
|more or redirected to a file, for example:
si viewprefs --global --showValidValues >prefs.txt
The commands and preference keys are also listed on the
preferences reference page.
• --[no]resetToDefault
controls whether to revert specified settings to the default values as shipped with the PTC RV&S Client. If specifying --resetToDefault, you must not specify =value for each preference.
• --[no]save
controls whether changes should be permanently saved.
• --[no]ask
controls prompts to the user for specific preferences. Each preference option may be set to either --ask or --noask. When the command itself is run, any option set to --ask and that is not explicitly set with command line options will be queried. If this --ask option is set, then you do not specify a value for the preference at the same time, but instead the pref=value must supply one of the following four valid ask values:
◦ once
asks the user the first time only, and then uses the provided value every time after for the duration of that command.
◦ never
never asks the user for a response, but uses the current setting (which may be specified by a preference).
◦ element-last
asks the user for each element of the selection, providing the most recently used value as the default.
◦ element-pref
asks the user for each element of the selection, resetting the default to the value specified by the preference.
For example, to set the server host for
si connect to a specific host name, you specify something like:
si setprefs --command=connect
server.hostname=specific.hostname.com
but to set the preference to ask for a host name when using
si connect, you specify something like:
si setprefs --command=connect
--ask server.hostname=element-last
• --ui=[unspecified|gui|cli|api]
controls whether to apply the preference to the graphical user interface, the command line interface, or when the interface is unspecified. By default,
--ui=cli is implied when issuing the
si setprefs. To set preferences for GUI behavior, however, you should specify
--ui=gui. For example, to set the
manage preference to be true in the GUI for the
si sandboxes command, you would type:
si setprefs --command=sandboxes --ui=gui manage=true
These correlate to settings in the IntegrityClient.rc file, which can be seen as having the gui.si. or cli.si. prefix, or simply the si. prefix when it is unspecified.
• pref[=value]...
identifies the preference string. If you specified the --resetToDefault option, then you only need to specify the preference name; otherwise specify a value for the preference. Use spaces to specify multiple preferences.
Diagnostics
See the
diagnostics reference page for possible exit status values.
Preferences
Using
si setprefs or
si viewprefs, you are able to set or view the preference keys for this command.
See Also