task: Add ZED_DIRNAME and ZED_RELATIVE_FILE task variables (#12245)
Release Notes: - Added ZED_RELATIVE_FILE (path to current file relative to worktree root) and ZED_DIRNAME (path to the directory containing current file) task variables.
This commit is contained in:
parent
b0d89d6f34
commit
0eff1eae76
7 changed files with 45 additions and 16 deletions
|
@ -45,6 +45,8 @@ These variables allow you to pull information from the current editor and use it
|
|||
- `ZED_ROW`: current line row
|
||||
- `ZED_FILE`: absolute path of the currently opened file (e.g. `/Users/my-user/path/to/project/src/main.rs`)
|
||||
- `ZED_FILENAME`: filename of the currently opened file (e.g. `main.rs`)
|
||||
- `ZED_DIRNAME`: absolute path of the currently opened file with file name stripped (e.g. `/Users/my-user/path/to/project/src`)
|
||||
- `ZED_RELATIVE_FILE`: path of the currently opened file, relative to `ZED_WORKTREE_ROOT` (e.g. `src/main.rs`)
|
||||
- `ZED_STEM`: stem (filename without extension) of the currently opened file (e.g. `main`)
|
||||
- `ZED_SYMBOL`: currently selected symbol; should match the last symbol shown in a symbol breadcrumb (e.g. `mod tests > fn test_task_contexts`)
|
||||
- `ZED_SELECTED_TEXT`: currently selected text
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue