diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2014-09-24 09:02:53 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2014-09-24 09:02:53 +0200 |
| commit | 0c581075c55fe3c7839fdc293282a9544280bfab (patch) | |
| tree | b5fe531adb1f63f4871202976bc966a34c7c7463 /config.def.h | |
| parent | f26e811bb073297ac1ca753c2c3cb746af07b9bf (diff) | |
| download | vis-0c581075c55fe3c7839fdc293282a9544280bfab.tar.gz vis-0c581075c55fe3c7839fdc293282a9544280bfab.tar.xz | |
Handle filenames with spaces
Before :w foo bar would create 2 files whereas now 1 file named
"foo bar" will be created.
Longterm such ambigious command arguments should be given surrounded
with quotes.
Diffstat (limited to 'config.def.h')
| -rw-r--r-- | config.def.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/config.def.h b/config.def.h index 097dfb5..993f2a0 100644 --- a/config.def.h +++ b/config.def.h @@ -47,20 +47,20 @@ enum { /* command recognized at the ':'-prompt. tested top to bottom, first match wins. */ static Command cmds[] = { - { "^[0-9]+$", cmd_gotoline }, - { "^e(dit)?!?$", cmd_edit }, - { "^o(pen)?$", cmd_open }, - { "^qa(ll)?!?$", cmd_qall }, - { "^q(quit)?!?$", cmd_quit }, - { "^r(ead)?$", cmd_read }, - { "^sav(as)?$", cmd_saveas }, - { "^set$", cmd_set }, - { "^sp(lit)?$", cmd_split }, - { "^s(ubstitute)?$", cmd_substitute }, - { "^v(split)?$", cmd_vsplit }, - { "^wq!?$", cmd_wq }, - { "^w(rite)?$", cmd_write }, - { /* array terminator */ }, + { "^[0-9]+$", cmd_gotoline, false }, + { "^e(dit)?!?$", cmd_edit, false }, + { "^o(pen)?$", cmd_open, false }, + { "^qa(ll)?!?$", cmd_qall, false }, + { "^q(quit)?!?$", cmd_quit, false }, + { "^r(ead)?$", cmd_read, false }, + { "^sav(as)?$", cmd_saveas, false }, + { "^set$", cmd_set, true }, + { "^sp(lit)?$", cmd_split, false }, + { "^s(ubstitute)?$", cmd_substitute, false }, + { "^v(split)?$", cmd_vsplit, false }, + { "^wq!?$", cmd_wq, false }, + { "^w(rite)?$", cmd_write, false }, + { /* array terminator */ }, }; /* draw a statubar, do whatever you want with win->statuswin curses window */ |
