summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/arguments.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix quoting with newlines and single quotes.nicm2020-06-121-12/+15
|
* Instead of using a custom parse function to process {}, treat it as anicm2020-06-041-1/+6
| | | | | | | set of statements and parse with yacc, then convert back to a string as the last step. This means the rules are consistent inside and outside {}, %if and friends work at the right time, and the final result isn't littered with unnecessary newlines.
* Fix some error strings, from Kris Katterjohn.nicm2020-05-251-3/+3
|
* Add formats for after hook command arguments.nicm2020-05-161-17/+39
|
* Change so main-pane-width and height can be given as a percentage.nicm2020-04-221-11/+18
|
* Print empty arguments properly.nicm2020-04-121-3/+5
|
* Break code to convert an argument as a percentage into a common function.nicm2020-03-211-1/+51
|
* getopt is not required to set optarg to NULL when there is no argumentnicm2020-03-171-1/+3
| | | | and some do not, so set it explicitly each time.
* Add a -H flag to send-keys to send literal keys given as hex numbersnicm2019-07-091-4/+14
| | | | | | (needed for control clients to send mouse sequences). Also add some format flags for UTF-8 and SGR mouse mode. Requested by Bradley Smith in GitHub issues 1832 and 1833.
* Add a -A flag to show-options to show parent options as well.nicm2019-06-201-2/+4
|
* Use VIS_CSTYLE for the arguments and add the missing escapes it cannicm2019-05-291-2/+2
| | | | generate to the parser.
* Do not read past the end of the argument string if it is empty.nicm2019-05-281-1/+3
|
* Add an additional {} syntax for defining strings in the configurationnicm2019-05-271-2/+2
| | | | | | | file, making it much tidier to define commands that contain other tmux or shell commands (like if-shell). Also tweak bind-key to expect a string if it is only given one argument, so {} can be used with it as well. From Avi Halachmi.
* Break the argument escaping code into a separate function and use it tonicm2019-05-231-23/+40
| | | | escape key bindings in list-keys. Also escape ~ and ; and $ properly.
* Support multiple occurances of the same argument. Use this for a newnicm2019-04-281-48/+111
| | | | | | flag -e to new-window, split-window, respawn-window, respawn-pane to pass environment variables into the newly created process. From Steffen Christgau in GitHub issue 1697.
* Run alert hooks based on the options rather than unconditionally, fromnicm2017-08-231-2/+2
| | | | Brad Town.
* Rewrite of choose mode, both to simplify and tidy the code and to addnicm2017-05-301-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | some modern features. Now the common code is in mode-tree.c, which provides an API used by the three modes now separated into window-{buffer,client,tree}.c. Buffer mode shows buffers, client mode clients and tree mode a tree of sessions, windows and panes. Each mode has a common set of key bindings plus a few that are specific to the mode. Other changes are: - each mode has a preview pane: for buffers this is the buffer content (very useful), for others it is a preview of the pane; - items may be sorted in different ways ('O' key); - multiple items may be tagged and an operation applied to all of them (for example, to delete multiple buffers at once); - in tree mode a command may be run on the selected item (session, window, pane) or on tagged items (key ':'); - displayed items may be filtered in tree mode by using a format (this is used to implement find-window) (key 'f'); - the custom format (-F) for the display is no longer available; - shortcut keys change from 0-9, a-z, A-Z which was always a bit weird with keys used for other uses to 0-9, M-a to M-z. Now that the code is simpler, other improvements will come later. Primary key bindings for each mode are documented under the commands in the man page (choose-buffer, choose-client, choose-tree). Parts written by Thomas Adam.
* Do not need getopt.h.nicm2017-04-221-2/+1
|
* Plain stravis() because it will mangle UTF-8 characters, so addnicm2017-01-181-3/+3
| | | | utf8_stravis() which calls our existing utf8_strvis() and use it instead
* Run arguments through vis() as well when printing them.nicm2017-01-181-9/+23
|
* Add static in window-*.c and move some internal functions out of tmux.h.nicm2016-10-111-26/+3
|
* Some more static.nicm2016-10-101-5/+6
|
* I no longer use my SourceForge address so replace it.nicm2016-01-191-2/+2
|
* Do not set a limit on the length of commands when printing them.nicm2015-11-271-44/+40
|
* struct args_entry can go into arguments.c.nicm2015-08-291-1/+7
|
* Tidy up some includes.nicm2014-10-201-1/+2
|
* Don't blindly increase offsets by the return value of snprintf, if therenicm2014-04-111-4/+10
| | | | | wasn't enough space this will go off the end. Instead clamp to the available space. Fixes crash reported by Julien Rebetez.
* Couple of fixes from cppcheck via Tiago Cunha.nicm2014-01-151-3/+2
|
* Simplify args_set, from Tiago Cunha.nicm2014-01-091-10/+6
|
* Include unistd.h as it is the standard location for getopt().okan2013-11-171-1/+2
| | | | OK millert@
* Instead of eating 1024 bytes or so for the arguments of each command,nicm2013-05-311-43/+79
| | | | save memory by using an RB tree. From Tiago Cunha.
* xfree is not particularly helpful, remove it. From Thomas Adam.nicm2012-07-101-13/+9
|
* Pass the right size to calloc (* not **).nicm2011-07-091-2/+2
|
* Free old argument even if setting to NULL.nicm2011-01-301-5/+6
|
* Clean up and simplify tmux command argument parsing.nicm2011-01-041-0/+222
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.