1
0
mirror of https://github.com/robbyrussell/oh-my-zsh.git synced 2026-02-12 20:31:00 +01:00

3 Commits

Author SHA1 Message Date
dependabot[bot]
137bfbbfd1 chore(deps): bump certifi in /.github/workflows/dependencies (#13094)
Bumps [certifi](https://github.com/certifi/python-certifi) from 2025.1.31 to 2025.4.26.
- [Commits](https://github.com/certifi/python-certifi/compare/2025.01.31...2025.04.26)

---
updated-dependencies:
- dependency-name: certifi
  dependency-version: 2025.4.26
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-27 14:55:23 +02:00
Michael Elliot
476a7fc89e chore: fix typo (#13089) 2025-04-27 10:26:11 +02:00
ohmyzsh[bot]
44913a1f16 feat(wd): update to v0.10.0 (#13093)
Co-authored-by: ohmyzsh[bot] <54982679+ohmyzsh[bot]@users.noreply.github.com>
2025-04-27 10:25:02 +02:00
5 changed files with 29 additions and 5 deletions

View File

@@ -30,7 +30,7 @@ dependencies:
plugins/wd:
repo: mfaerevaag/wd
branch: master
version: tag:v0.9.3
version: tag:v0.10.0
precopy: |
set -e
rm -r test

View File

@@ -1,4 +1,4 @@
certifi==2025.1.31
certifi==2025.4.26
charset-normalizer==3.4.1
idna==3.10
PyYAML==6.0.2

View File

@@ -192,7 +192,7 @@ _omz_source() {
fi
}
# Load all of the lib files in ~/oh-my-zsh/lib that end in .zsh
# Load all of the lib files in ~/.oh-my-zsh/lib that end in .zsh
# TIP: Add files you don't want in git to .gitignore
for lib_file ("$ZSH"/lib/*.zsh); do
_omz_source "lib/${lib_file:t}"

View File

@@ -37,6 +37,7 @@ function _wd() {
'rm:Removes the given warp point'
'list:Outputs all stored warp points'
'ls:Show files from given warp point'
'open:Open warp point in the default file explorer'
'path:Show path to given warp point'
'show:Outputs all warp points that point to the current directory or shows a specific target directory for a point'
'help:Show this extremely helpful text'
@@ -73,6 +74,9 @@ function _wd() {
ls)
_describe -t points "Warp points" warp_points && ret=0
;;
open)
_describe -t points "Warp points" warp_points && ret=0
;;
path)
_describe -t points "Warp points" warp_points && ret=0
;;

View File

@@ -8,7 +8,7 @@
# @github.com/mfaerevaag/wd
# version
readonly WD_VERSION=0.9.3
readonly WD_VERSION=0.10.0
# colors
readonly WD_BLUE="\033[96m"
@@ -86,6 +86,7 @@ Commands:
show Print warp points to current directory
list Print all stored warp points
ls <point> Show files from given warp point (ls)
open <point> Open the warp point in the default file explorer (open / xdg-open)
path <point> Show the path to given warp point (pwd)
clean Remove points warping to nonexistent directories (will prompt unless --force is used)
@@ -377,6 +378,21 @@ wd_ls()
ls "${dir/#\~/$HOME}"
}
wd_open()
{
wd_getdir "$1"
if command -v open >/dev/null 2>&1; then
# MacOS, Ubuntu (alias)
open "${dir/#\~/$HOME}"
elif command -v xdg-open >/dev/null 2>&1; then
# Most Linux desktops
xdg-open "${dir/#\~/$HOME}"
else
echo "No known file opener found (need 'open' or 'xdg-open')." >&2
exit 1
fi
}
wd_path()
{
wd_getdir "$1"
@@ -521,7 +537,7 @@ do
done < "$wd_config_file"
# get opts
args=$(getopt -o a:r:c:lhs -l add:,rm:,clean,list,ls:,path:,help,show -- $*)
args=$(getopt -o a:r:c:lhs -l add:,rm:,clean,list,ls:,open:,path:,help,show -- $*)
# check if no arguments were given, and that version is not set
if [[ ($? -ne 0 || $#* -eq 0) && -z $wd_print_version ]]
@@ -571,6 +587,10 @@ else
wd_ls "$2"
break
;;
"-o"|"--open"|"open")
wd_open "$2"
break
;;
"-p"|"--path"|"path")
wd_path "$2"
break