From f9b83ce35531a99a6c463225a57e2acb64f2dde0 Mon Sep 17 00:00:00 2001 From: Seth Etter Date: Fri, 27 Feb 2026 07:54:34 -0600 Subject: [PATCH] zsh: allow tm to accept arg from stdin --- scripts/tmopen.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/tmopen.sh b/scripts/tmopen.sh index 7ca7df0..33f694f 100755 --- a/scripts/tmopen.sh +++ b/scripts/tmopen.sh @@ -19,13 +19,15 @@ get_repo_name_from_url() { echo "${basename%.git}" | tr '.' '-' } -# Check if a parameter was provided -if [ -z "$1" ]; then +# Accept input from argument or stdin +if [ -n "$1" ]; then + input=$1 +elif [ ! -t 0 ]; then + read -r input +else echo "Usage: tmopen [session_name]" exit 1 fi - -input=$1 is_url=false # Check if the input is a URL -- 2.51.2