summaryrefslogtreecommitdiffstats
path: root/cmd-set-option.c
AgeCommit message (Collapse)Author
2014-04-23Merge branch 'obsd-master'Thomas Adam
Conflicts: Makefile tmux.1 window.c
2014-04-17Some more long lines.nicm
2014-04-17Remove the "info" message mechanism, this was only used for about fivenicm
mostly useless and annoying messages. Change those commands to silence on success like all the others. Still accept the -q command line flag and "quiet" server option for now.
2014-04-17Extend the -q flag to set-option to suppress errors about unknownnicm
options - this will allow options to be removed more easily.
2014-02-19Merge branch 'obsd-master'Thomas Adam
2014-02-17Don't crash when given a invalid colour, reported by Felix Rosencrantz,nicm
fix from Thomas Adam.
2014-02-16Merge branch 'obsd-master'Thomas Adam
Conflicts: tmux.1 tmux.c
2014-02-14Style nit - no space between function name and bracket.nicm
2014-01-31Merge branch 'obsd-master'Thomas Adam
Conflicts: Makefile cmd-server-info.c cmd-start-server.c
2014-01-28Allow replacing each of the many sets of separate foo-{fg,bg,attr}nicm
options with a single foo-style option. For example: set -g status-fg yellow set -g status-bg red set -g status-attr blink Becomes: set -g status-style fg=yellow,bg=red,blink The -a flag to set can be used to add to rather than replace a style. So: set -g status-bg red Becomes: set -ag status-style bg=red Currently this is fully backwards compatible (all *-{fg,bg,attr} options remain) but the plan is to deprecate them over time. From Tiago Cunha.
2013-10-10Remove the barely-used and unnecessary command check() function.nicm
2013-08-21Remove the barely-used and unnecessary command check() function.Nicholas Marriott
2013-07-06Merge branch 'obsd-master'Thomas Adam
2013-07-05Clarify error messages when setting options, from Thomas Adam.Nicholas Marriott
2013-03-24Add a -o option to set-option to prevent setting an option already set,Nicholas Marriott
from Thiago Padilha.
2013-03-21Add user options, prefixed with @. May be set to any arbitrary string.Nicholas Marriott
2013-02-23Add a -o option to set-option to prevent setting an option already set, fromNicholas Marriott
Thiago Padilha.
2013-02-23Add a command queue to standardize and simplify commands that call otherNicholas Marriott
commands and allow a command to block execution of subsequent commands. This allows run-shell and if-shell to be synchronous which has been much requested. Each client has a default command queue and commands are consumed one at a time from it. A command may suspend execution from the queue by returning CMD_RETURN_WAIT and then resume it by calling cmd_continue() - for example run-shell does this from the callback that is fired after the job is freed. When the command queue becomes empty, command clients are automatically exited (unless attaching). A callback is also fired - this is used for nested commands in, for example, if-shell which can block execution of the client's cmdq until a new cmdq becomes empty. Also merge all the old error/info/print functions together and lose the old curclient/cmdclient distinction - a cmdq is bound to one client (or none if in the configuration file), this is a command client if c->session is NULL otherwise an attached client.
2013-02-13Add user options, prefixed with @. May be set to any arbitrary string.Nicholas Marriott
2013-02-12Add -v to set and setw to show only option value.Nicholas Marriott
2012-07-11Sync OpenBSD patchset 1151:Tiago Cunha
Make command exec functions return an enum rather than -1/0/1 values and add a new value to mean "leave client running but don't attach" to fix problems with using some commands in a command sequence. Most of the work by Thomas Adam, problem reported by "jspenguin" on SF bug 3535531.
2012-07-11Sync OpenBSD patchset 1150:Tiago Cunha
xfree is not particularly helpful, remove it. From Thomas Adam.
2012-07-11Make command exec functions return an enum rather than -1/0/1 values andNicholas Marriott
add a new value to mean "leave client running but don't attach" to fix problems with using some commands in a command sequence. Most of the work by Thomas Adam, problem reported by "jspenguin" on SF bug 3535531.
2012-07-10xfree is not particularly helpful, remove it. From Thomas Adam.Nicholas Marriott
2012-04-10Sync OpenBSD patchset 1091:Tiago Cunha
Do not fire name timer when automatic-rename is off, from Tim Ruehsen a while ago.
2012-04-08Do not fire name timer when automatic-rename is off, from Tim Ruehsen aNicholas Marriott
while ago.
2012-03-18Sync OpenBSD patchset 1063:Tiago Cunha
Add -q option to set-option to turn off info message, from marcel partap.
2012-03-17Add -q option to set-option to turn off info message, from marcel partap.Nicholas Marriott
2012-03-03Sync OpenBSD patchset 1032:Tiago Cunha
Allow a single option to be specified to show-options to show just that option.
2012-02-25Allow a single option to be specified to show-options to show just thatNicholas Marriott
option.
2012-01-21Sync OpenBSD patchset 1007:Tiago Cunha
Drop the ability to have a list of keys in the prefix in favour of two separate options, prefix and prefix2. This simplifies the code and gets rid the data options type which was only used for this one option. Also add a -2 flag to send-prefix to send the secondary prefix key, fixing a cause of minor irritation. People who want three prefix keys are out of luck :-).
2012-01-21Drop the ability to have a list of keys in the prefix in favour of twoNicholas Marriott
separate options, prefix and prefix2. This simplifies the code and gets rid the data options type which was only used for this one option. Also add a -2 flag to send-prefix to send the secondary prefix key, fixing a cause of minor irritation. People who want three prefix keys are out of luck :-).
2011-07-09Expand the Id keyword. Tiago Cunha
2011-04-06|PatchSet 882Nicholas Marriott
|Date: 2011/04/05 20:37:01 |Author: nicm |Branch: HEAD |Tag: (none) |Log: |Add a flag to cmd_find_session so that attach-session can prefer |unattached sessions when choosing the most recently used (if -t is not |given). Suggested by claudio@.
2011-04-06|PatchSet 879Nicholas Marriott
|Date: 2011/03/29 22:09:13 |Author: nicm |Branch: HEAD |Tag: (none) |Log: |For convenience, work out what type of option is being set by name |regardless of the -s or -w flags (these remain documented however).
2011-04-06|PatchSet 878Nicholas Marriott
|Date: 2011/03/29 22:07:08 |Author: nicm |Branch: HEAD |Tag: (none) |Log: |Checking for particular options and redrawing is not necessary as we |already redraw unconditionally.
2011-04-06|PatchSet 877Nicholas Marriott
|Date: 2011/03/29 21:31:22 |Author: nicm |Branch: HEAD |Tag: (none) |Log: |Update an out-of-date and inaccurate comment.
2011-04-05Add a flag to cmd_find_session so that attach-session can preferNicholas Marriott
unattached sessions when choosing the most recently used (if -t is not given). Suggested by claudio@.
2011-03-29For convenience, work out what type of option is being set by nameNicholas Marriott
regardless of the -s or -w flags (these remain documented however).
2011-03-29Checking for particular options and redrawing is not necessary as weNicholas Marriott
already redraw unconditionally.
2011-03-29Update an out-of-date and inaccurate comment.Nicholas Marriott
2011-02-15Sync OpenBSD patchset 855:Tiago Cunha
Simplify the way jobs work and drop the persist type, so all jobs are fire-and-forget. Status jobs now managed with two trees of output (new and old), rather than storing the output in the jobs themselves. When the status line is processed any jobs which don't appear in the new tree are started and the output from the old tree displayed. When a job finishes it updates the new tree with its output and that is used for any subsequent redraws. When the status interval expires, the new tree is moved to the old so that all jobs are run again. This fixes the "#(echo %H:%M:%S)" problem which would lead to thousands of identical persistent jobs and high memory use (this can still be achieved by adding "sleep 30" but that is much less likely to happen by accident).
2011-01-26Simplify the way jobs work and drop the persist type, so all jobs areNicholas Marriott
fire-and-forget. Status jobs now managed with two trees of output (new and old), rather than storing the output in the jobs themselves. When the status line is processed any jobs which don't appear in the new tree are started and the output from the old tree displayed. When a job finishes it updates the new tree with its output and that is used for any subsequent redraws. When the status interval expires, the new tree is moved to the old so that all jobs are run again. This fixes the "#(echo %H:%M:%S)" problem which would lead to thousands of identical persistent jobs and high memory use (this can still be achieved by adding "sleep 30" but that is much less likely to happen by accident).
2011-01-07Sync OpenBSD patchset 831:Tiago Cunha
Now that parsing is common, merge some of the small, related commands together to use the same code. Also add some arguments (such as -n and -p) to some commands to match existing commands.
2011-01-07Sync OpenBSD patchset 830:Tiago Cunha
argc will be 1 not 2 with no option value.
2011-01-07Sync OpenBSD patchset 829:Tiago Cunha
Clean up and simplify tmux command argument parsing. Originally, tmux commands were parsed in the client process into a struct with the command data which was then serialised and sent to the server to be executed. The parsing was later moved into the server (an argv was sent from the client), but the parse step and intermediate struct was kept. This change removes that struct and the separate parse step. Argument parsing and printing is now common to all commands (in arguments.c) with each command left with just an optional check function (to validate the arguments at parse time), the exec function and a function to set up any key bindings (renamed from the old init function). This is overall more simple and consistent. There should be no changes to any commands behaviour or syntax although as this touches every command please watch for any unexpected changes.
2011-01-04Now that parsing is common, merge some of the small, related commandsNicholas Marriott
together to use the same code. Also add some arguments (such as -n and -p) to some commands to match existing commands.
2011-01-04argc will be 1 not 2 with no option value.Nicholas Marriott
2011-01-04Clean up and simplify tmux command argument parsing.Nicholas Marriott
Originally, tmux commands were parsed in the client process into a struct with the command data which was then serialised and sent to the server to be executed. The parsing was later moved into the server (an argv was sent from the client), but the parse step and intermediate struct was kept. This change removes that struct and the separate parse step. Argument parsing and printing is now common to all commands (in arguments.c) with each command left with just an optional check function (to validate the arguments at parse time), the exec function and a function to set up any key bindings (renamed from the old init function). This is overall more simple and consistent. There should be no changes to any commands behaviour or syntax although as this touches every command please watch for any unexpected changes.
2011-01-03Sync OpenBSD patchset 826:Tiago Cunha
Move the user-visible parts of all options (names, types, limit, default values) together into one set of tables in options-table.c. Also clean up and simplify cmd-set-options.c and move a common print function into option-table.c.