From 810a0f6e3db46485ecb657d4fa39865ccb27a3fc Mon Sep 17 00:00:00 2001 From: Bartek Pacia Date: Mon, 8 Apr 2024 22:04:15 +0100 Subject: [PATCH] update docs --- plugins/macos/README.md | 2 +- plugins/macos/macos.plugin.zsh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/macos/README.md b/plugins/macos/README.md index 1cb9b395d..2c52ec8a7 100644 --- a/plugins/macos/README.md +++ b/plugins/macos/README.md @@ -17,7 +17,7 @@ Original author: [Sorin Ionescu](https://github.com/sorin-ionescu) | `tab` | Open the current directory in a new tab | | `split_tab` | Split the current terminal tab horizontally | | `vsplit_tab` | Split the current terminal tab vertically | -| `ofd` | Open the current directory in a Finder window | +| `ofd` | Open passed directories (or $PWD by default) in Finder | | `pfd` | Return the path of the frontmost Finder window | | `pfs` | Return the current Finder selection | | `cdf` | `cd` to the current Finder directory | diff --git a/plugins/macos/macos.plugin.zsh b/plugins/macos/macos.plugin.zsh index d7a121925..2702a1901 100644 --- a/plugins/macos/macos.plugin.zsh +++ b/plugins/macos/macos.plugin.zsh @@ -3,7 +3,8 @@ 0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}" 0="${${(M)0:#/*}:-$PWD/$0}" -# Open the current directory in a Finder window +# Open in Finder the directories passed as arguments, or the current directory if +# no directories are passed function ofd { if (( ! $# )); then open_command $PWD