Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect command format for moduserprefs.sh #5296

Closed
mjnewton opened this issue May 31, 2016 · 6 comments
Closed

Incorrect command format for moduserprefs.sh #5296

mjnewton opened this issue May 31, 2016 · 6 comments
Milestone

Comments

@mjnewton
Copy link

mjnewton commented May 31, 2016

I had cause to use the bin/moduserprefs.sh command to remove some user preferences and according to the script the command format is:

Usage: moduserprefs.sh [options] pref-name [pref-value]
Options:
--user=user-id User ID in local database
--config=path Location of additional configuration file
--delete Unset the given preference
--type=type Pref-value type: int, bool, string

However, running the following command didn't work:

moduserprefs.sh --delete message_extwin

What did work though was:

moduserprefs.sh message_extwin --delete

I believe that the command format should therefore be described as:

Usage: moduserprefs.sh [options] pref-name [pref-value | --delete]
Options:
--user=user-id User ID in local database
--config=path Location of additional configuration file
--type=type Pref-value type: int, bool, string

(I haven't tried the --config and --type options so don't now if they too should be before the pref-name or after)

@rmcaninch
Copy link
Contributor

It used to start out something like:

print "Usage: moduserprefs.sh [--user=user-id] pref-name [pref-value|--delete]\n";

That is probably clearer that you follow the pref-name with either a value or the --delete flag.

@mjnewton
Copy link
Author

Yes, it did seem altogether more intuitive to me to be either setting the preference or deleting it.

@alecpl
Copy link
Member

alecpl commented Jun 1, 2016

--delete is an option as other options so I think the description is correct and moduserprefs.sh --delete pref-name should work as expected. No?

@alecpl alecpl closed this as completed Jun 1, 2016
@mjnewton
Copy link
Author

mjnewton commented Jun 1, 2016

No; as mentioned it does not work if you supply --delete as an option:

$ ./moduserprefs.sh --delete message_extwin
Missing required parameters.
Usage: moduserprefs.sh [options] pref-name [pref-value]
Options:
--user=user-id User ID in local database
--config=path Location of additional configuration file
--delete Unset the given preference
--type=type Pref-value type: int, bool, string

It has to be supplied in place of pref-value.

@alecpl
Copy link
Member

alecpl commented Jun 1, 2016

Sorry, I didn't check. So, looks like a bug.

@alecpl alecpl reopened this Jun 1, 2016
@alecpl alecpl added this to the 1.2.1 milestone Jun 1, 2016
@mjnewton
Copy link
Author

mjnewton commented Jun 1, 2016

Thanks Aleksander!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants