Commit Graph

9869 Commits

Author SHA1 Message Date
nicm
a3c6057b51 bind-key needs to allow commands for any argument for the moment. 2021-08-25 09:18:08 +00:00
Thomas Adam
c7266ca78d Merge branch 'obsd-master' into master 2021-08-25 10:01:10 +01:00
nicm
03d173cbd8 Validate command argument types (string or command list) and give more
useful error messages.
2021-08-25 08:51:55 +00:00
nicm
c6d6af4903 setupterm needs char * not const char * on some platforms. 2021-08-25 07:37:20 +00:00
Nicholas Marriott
6ac09aa47c Disable a couple of warnings on macOS. 2021-08-25 08:36:51 +01:00
nicm
a252fadf8a Fix up some printflike attributes. 2021-08-25 07:09:30 +00:00
nicm
78da5a3756 Start inputs as NULL so not freeing random stack garbage, GitHub issue 2852. 2021-08-25 06:36:05 +00:00
Thomas Adam
7fe3588e49 Merge branch 'obsd-master' into master 2021-08-23 20:01:09 +01:00
nicm
841ce74b43 args_make_commands_now needs to take an extra reference to the returned
command list since it will be freed already.
2021-08-23 17:05:43 +00:00
Thomas Adam
95a374d7d2 Merge branch 'obsd-master' into master 2021-08-23 16:06:46 +01:00
nicm
210e71edf3 Move command argument parsing common functions and don't bother to parse
again if given a command rather than a string.
2021-08-23 12:33:55 +00:00
nicm
03b83a5a34 Key bindings steal a reference to the command instead of adding their
own, it was correct not to add a reference when parsing, but the
bind-key then needs to add one.
2021-08-23 11:48:21 +00:00
nicm
1f0c0914c7 Revert one of previous, for some reason it is being freed. 2021-08-23 11:08:26 +00:00
nicm
4a753dbefc Fix a few memory leaks. 2021-08-23 11:04:21 +00:00
nicm
3ed37a2079 Limit width and height to tty correctly, GitHub issue 2843. 2021-08-23 08:17:41 +00:00
Thomas Adam
1dec1ca146 Merge branch 'obsd-master' into master 2021-08-22 18:01:18 +01:00
Nicholas Marriott
bc71e233d9 Fix style regress test. 2021-08-22 16:33:57 +01:00
nicm
2e9bafaf14 Fix handling of leading #s when working out width. 2021-08-22 15:33:14 +00:00
Thomas Adam
03054598df Merge branch 'obsd-master' into master 2021-08-22 16:01:19 +01:00
nicm
72d905f32c Do not double free expanded path in source-file, also remove some
unnecessary assignments.
2021-08-22 13:48:29 +00:00
nicm
c0048d6d20 Insert alias in the right place, GitHub issue 2842. 2021-08-22 13:00:28 +00:00
Thomas Adam
324f87cf14 Merge branch 'obsd-master' into master 2021-08-22 12:08:05 +01:00
nicm
0084cbef5a Free value properly. 2021-08-21 20:57:52 +00:00
nicm
069f5925af Preserve argument type in command and convert to string on demand. 2021-08-21 20:46:43 +00:00
Thomas Adam
921991c98d Merge branch 'obsd-master' into master 2021-08-21 20:01:22 +01:00
nicm
326d2ef234 Pass typed arguments out of the parser into the arguments list and let
it convert them into strings.
2021-08-21 18:39:07 +00:00
nicm
63b6eec278 Use new syntax for default key bindings. 2021-08-21 17:41:19 +00:00
nicm
5241dae87d Stop caring about empty commands, just treat as a null command. 2021-08-21 17:25:32 +00:00
Thomas Adam
4d3367e965 Merge branch 'obsd-master' into master 2021-08-21 16:01:26 +01:00
nicm
68cacaec68 Remove some members of struct cmd which are no longer used. 2021-08-21 14:10:08 +00:00
nicm
c286fbdcd7 Preserve command group when moving temporary list to current list being
buit.
2021-08-21 14:06:17 +00:00
Thomas Adam
62036121fa Merge branch 'obsd-master' into master 2021-08-21 12:01:41 +01:00
nicm
110ba767e5 Rename a member to match what it will be in future. 2021-08-21 10:28:05 +00:00
nicm
08e6360f23 Add args parsing callback for some future work, currently unused. 2021-08-21 10:22:38 +00:00
nicm
d371764d02 Wrap command argument definitions in their own struct. 2021-08-21 08:44:59 +00:00
Thomas Adam
b0da0cee4d Merge branch 'obsd-master' into master 2021-08-20 22:01:46 +01:00
nicm
d589be6c65 A couple more spacing fixes. 2021-08-20 20:08:30 +00:00
nicm
caa8703a23 Spacing tweaks. 2021-08-20 20:04:22 +00:00
nicm
5f32b7d961 Hide struct args behind a couple of accessor functions. 2021-08-20 19:50:16 +00:00
nicm
de94a344f6 Add a couple of const and fix some warnings. 2021-08-20 19:34:51 +00:00
nicm
c76b28de24 Remove some unnecessary blank lines. 2021-08-20 19:08:36 +00:00
Thomas Adam
944fde7c57 Merge branch 'obsd-master' into master 2021-08-20 20:01:27 +01:00
nicm
90dd474c3e Expose args_value struct (will be needed soon) and add some missing frees. 2021-08-20 18:59:53 +00:00
nicm
6cbc83c6a6 Add a way to create an empty arguments set. 2021-08-20 17:53:54 +00:00
nicm
e463e8622d Remove stray spaces after function names. 2021-08-20 17:50:42 +00:00
nicm
01b13de655 Fill colour palette correctly from option for new panes, GitHub issue
2831.
2021-08-20 17:36:03 +00:00
Nicholas Marriott
41822ef782 Regress fixes. 2021-08-20 18:20:49 +01:00
Nicholas Marriott
5ed5b11b45 Add zeraphel complex binding to regress. 2021-08-20 14:34:44 +01:00
Thomas Adam
84955e3d62 Merge branch 'obsd-master' into master 2021-08-20 12:01:15 +01:00
nicm
f984446d19 Actually parse contents of {} as a command and then convert to a string
instead of just copying arguments around as strings.
2021-08-20 09:06:26 +00:00