From 172310d89c58d9a243fc6048a315284420e93f4a Mon Sep 17 00:00:00 2001 From: Alexander Gehrke Date: Tue, 31 Aug 2021 16:52:15 +0200 Subject: [PATCH] g-add: add missing with-term script --- lib/with-term | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 lib/with-term diff --git a/lib/with-term b/lib/with-term new file mode 100755 index 0000000..f915f0a --- /dev/null +++ b/lib/with-term @@ -0,0 +1,18 @@ +#!/bin/zsh + +if [[ "${0:t}" == "with-term" ]]; then + echo "Symlink to g\$progname to start \$progname in a new terminal" + echo "See g for launching with tmux" + exit 1 +fi + +if [[ -e /etc/zsh/zprofile ]]; then + . /etc/zsh/zprofile +fi +if [[ -e $HOME/.zshenv ]]; then + . $HOME/.zshenv +fi + +prog=${${0:t}[2,-1]} + +exec x-terminal-emulator -t G${prog} -e $prog