I am using zsh For example, i am in ~/Downloads, and want to run script, that will run new terminal with this path.
What i did. work.sh
#! /bin/bash
current_path="$PWD"
echo $current_path | xclip -selection clipboard
xfce4-terminal -e "zsh -c 'cd ~/Documents/bash/bash-scripts; ./work-test.sh; zsh'"
work-test.sh
#! /bin/bash
script_path=$(xclip -o -selection clipboard)
echo $script_path
sleep 1
cd "$script_path"
Run script with
source ~/Documents/bash/bash-scripts/work.sh
But don't work.