From bd10e6bfc3bf63754dd5fdddfee1681a35098657 Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Mon, 14 Jul 2025 22:40:39 -0400 Subject: [PATCH] AutoYADM commit: 2025-07-14 22:40:39 --- .config/fish/functions/uri-path.fish | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.config/fish/functions/uri-path.fish b/.config/fish/functions/uri-path.fish index ae0a5742..dca5555b 100644 --- a/.config/fish/functions/uri-path.fish +++ b/.config/fish/functions/uri-path.fish @@ -4,15 +4,16 @@ function uri-path echo "Convert a file URI to a Path." echo "-h/--help for help." echo "-r/--reverse to convert a path to URI." + return 0 end - if test -z "$argv[1]" + if test -z "$argv" read -f input else - set input $argv[1] + set input $argv end if not set -q _flag_r - string unescape --style=url "$input" | string replace -a ' ' '\\ ' | string replace 'file://' '' + string unescape --style=url "$input" | string replace 'file://' '' else - printf 'file://%s\n' (string replace '\\ ' ' ' "$input" | string escape --style=url) + printf 'file://%s\n' (string escape --style=url "$input") end end