xaizek / vifm (License: GPLv2+) (since 2018-12-07)
Vifm is a file manager with curses interface, which provides Vi[m]-like environment for managing objects within file systems, extended with some useful ideas from mutt.
Commit aa7ac76a72f9058b78749ddcfa010c82869663cb

Document quoting and escaping rules in command-line mode
Add new *vifm-cmd-quoting* help section and remove outdated TODO entry
Author: Kirill Rekhov
Author date (UTC): 2025-12-25 00:22
Committer name: xaizek
Committer date (UTC): 2026-01-13 15:26
Parent(s): da961eb1214361ddd0415492a1852174685ed68a
Signing key: 99DC5E4DB05F6BE2
Tree: c57be5ea58531053b9b5591220f180ad2fd2c1da
File Lines added Lines deleted
TODO 0 1
data/vim/doc/app/vifm-app.txt 43 0
src/tags.c 1 0
File TODO changed (mode: 100644) (index 7673c8217..1a7699acd)
... ... Basic things:
16 16
17 17 Documentation: Documentation:
18 18 * State the need of *nix tools on Windows more explicitly. * State the need of *nix tools on Windows more explicitly.
19 * Document single and double quotes treating in the command-line mode.
20 19 * Divide docs into several files (as it's quite big now). * Divide docs into several files (as it's quite big now).
21 20 * Document name conflict resolution options. * Document name conflict resolution options.
22 21 * Add separate section on bookmarks. * Add separate section on bookmarks.
File data/vim/doc/app/vifm-app.txt changed (mode: 100644) (index a76071054..151b5b75a)
... ... Example: >
1259 1259 :noh[lsearch] :noh[lsearch]
1260 1260 This means the complete command is nohlsearch, and the short one is noh. This means the complete command is nohlsearch, and the short one is noh.
1261 1261
1262 *vifm-commands-quoting*
1263 Parsing of text after the colon is based on quoting and escaping rules. These
1264 rules determine how Vifm splits the entered text into arguments. (Note: some
1265 commands, such as :echo, interpret their arguments as an expression, but the
1266 quoting rules themselves remain the same.)
1267
1268 Supported mechanisms:
1269
1270 - single quotes '...'
1271 The content is taken literally.
1272 Backslash escaping does not work inside.
1273 However, '' inside single quotes is replaced with ' (same as in Vim).
1274 Everything between the quotes becomes a single argument.
1275
1276 - double quotes "..."
1277 Also form a single argument.
1278 A backslash inside double quotes escapes the next character
1279 (for example \" becomes a quote, \\ becomes a backslash).
1280 Some C‑style escape sequences are interpreted (e.g. \n, \t).
1281
1282 Example:
1283 :echo "a b\ c \"x\""
1284 output: a b c "x"
1285
1286 - backslash escaping \
1287 Outside quotes, it allows including spaces, quotes, or a backslash
1288 into an argument.
1289 Inside double quotes it works the same way.
1290 It does not work inside single quotes.
1291
1292 Example (visible behavior):
1293 :command Foo touch a\ b
1294 defines the Foo command with a single argument: a b
1295
1296 Calling it:
1297 :Foo
1298 creates a file named:
1299 a b
1300
1301 After processing quotes and backslashes, most commands split the line into
1302 arguments by spaces. Some commands (such as :substitute or :tr) use different
1303 separators.
1304
1262 1305 *vifm-commands-and-selection* *vifm-commands-and-selection*
1263 1306 Most of command-line commands completely reset selection in the current view. Most of command-line commands completely reset selection in the current view.
1264 1307 However, there are several exceptions: However, there are several exceptions:
File src/tags.c changed (mode: 100644) (index eba344ade..ec009dbf8)
... ... const char *tags[] = {
615 615 "vifm-commands", "vifm-commands",
616 616 "vifm-commands-and-selection", "vifm-commands-and-selection",
617 617 "vifm-commands-bg", "vifm-commands-bg",
618 "vifm-commands-quoting",
618 619 "vifm-compare-views", "vifm-compare-views",
619 620 "vifm-configure", "vifm-configure",
620 621 "vifm-count", "vifm-count",
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/vifm

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/vifm

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master