Add exists command
This commit is contained in:
6
HELP.md
6
HELP.md
@@ -446,6 +446,12 @@ Assuming the current subject is a valid single data document, convert it `from`
|
||||
Supports: `php`|`json`
|
||||
Example: `{"a": 1}` -> `convert json php` -> `['a' => 1]`
|
||||
|
||||
#### `exists <fs|var> <name>`
|
||||
Checks whether the given file or variable exists.
|
||||
Supports: `fs` for filesystem checks, `var` for variable names
|
||||
Example: `$a = 1` -> `exists var a` -> `1`
|
||||
Example: `exists fs fake-file.txt` -> `0`
|
||||
|
||||
#### User-specific setup files
|
||||
The file `~/.str.rc` is automatically executed when `str` starts up.
|
||||
You can use this to define a user-specific environment.
|
||||
|
||||
Reference in New Issue
Block a user