Created
August 23, 2025 19:58
-
-
Save uriel1998/098a2b42469c28446ae3e09fcc98c8cb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# IN TMUX.CONF | |
# bind | if-shell -b '~/bin/tmux_split_same_dir' "send-keys ''" | |
# bind \\ if-shell -b '~/bin/tmux_split_same_dir -h' "send-keys ''" | |
# Get current pane's path | |
current_dir=$(tmux display-message -p -F "#{pane_current_path}") | |
# Split the window (horizontally or vertically) | |
# Use -h for horizontal split, omit for vertical | |
if [ "${1}" == "-h" ];then | |
tmux split-window -h -c "${current_dir}" | |
else | |
tmux split-window -c "${current_dir}" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment