taskWeeChat - Tasks: task #12332, Setting default options for script...


task #12332: Setting default options for script options

Submitted by:  None
Submitted on:  Tue 27 Nov 2012 12:47:35 PM UTC  
Category: scriptsShould Start On: Tue 27 Nov 2012 12:00:00 AM UTC
Should be Finished on: Tue 27 Nov 2012 12:00:00 AM UTCPriority: 5 - Normal
Status: In ProgressPrivacy: Public
Percent Complete: 0%Assigned to: Sebastien Helleu <flashcode>
Originator Name: Peter BoströmOriginator Email: -unavailable-
Open/Closed: OpenPlanned Release: 0.4.2
IRC nick: pbos

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Fri 03 May 2013 09:48:00 AM UTC, comment #2:

Please use a hashtable as second argument (after name of option), so that any future default can be added without changing API and plugins calling this function.

Sebastien Helleu <flashcode>
Project AdministratorIn charge of this item.
Tue 19 Feb 2013 10:07:10 PM UTC, comment #1:

Patch attached. Coarsely tested for all script languages. :)

Peter Boström <pbos>
Project Member
Tue 27 Nov 2012 12:47:35 PM UTC, original submission:

Plugin variables have no default, so /set plugin.* looks weird because all scripts options have (default: "")

An api function: weechat.config_set_plugin_defaults(option, default_value, description)

Would allow changing the following snippet (from urlserver.py):


Ignoring the int(version) issue, this moves responsibility of displaying plugin defaults in descriptions from scripts to the /set system which already supports it. Scripts don't have to reinvent the wheel to display defaults, it's already in place. Less code duplication, and a more uniform look. Along with shorter code per script.



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #27482:  0001-core-API-function-config_set_defaults_plugin-for-set.patch added by pbos (34KiB - text/x-patch - Introduces 'config_set_defaults_plugin', deprecates 'config_set_desc_plugin')


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by pbos (Updated the item)
  • -unavailable- added by flashcode (Updated the item)
  • -unavailable- added by None (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 04 Jan 2014 08:23:04 AM UTCflashcodeAssigned topbos=>flashcode
    Fri 03 May 2013 09:48:00 AM UTCflashcodeStatusNone=>In Progress
      Planned ReleaseNone=>0.4.2
    Tue 19 Feb 2013 10:05:41 PM UTCpbosAttached File-=>Added 0001-core-API-function-config_set_defaults_plugin-for-set.patch, #27482
    Tue 19 Feb 2013 04:39:51 PM UTCflashcodeAssigned toNone=>pbos

    Back to the top

    Powered by Savane 3.1-cleanup1