Next: , Previous: , Up: Dot-Commands   [Contents][Index]

12.3 .file

The .file command opens a new IO space backed by a file, or switches to a previously opened file. The syntax is:

.file path

where path is a path to a file to open, which can be relative to poke’s current working directory or absolute.

Tilde expansion is performed in path, much like it’s done in the shell. This means you can include special characters like ~ (which will expand to your home directory) delimit the file name with " in case it includes leading or trailing blank characters, etc.

When a new file is opened it becomes the current IO space. From that point on, every map executed in the REPL or while loading a Poke program will operate on that IO space:

(poke) .file foo.o
The current file is now `foo.o'.