dotfiles

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit d2059db12087af0eab015691efb8e8788db856b9
parent 5190c42d528e08373a6753ff02987e5672f6978e
Author: Janis Pagel <janis.pagel@ims.uni-stuttgart.de>
Date:   Sun, 15 Jul 2018 00:19:15 +0200

Add script to customize current dir in tmux

Diffstat:
Mdotfiles.sh | 2++
Ascripts/tmux_pane_current_path.sh | 11+++++++++++
2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/dotfiles.sh b/dotfiles.sh @@ -27,3 +27,5 @@ rsync -ac --progress $GIT_REPO/tmux.conf ~/.tmux.conf rsync -ac --progress $GIT_REPO/taskrc ~/.taskrc rsync -ac --progress $GIT_REPO/vimrc ~/.vimrc + +rsync -ac --progress $GIT_REPO/scripts/tmux_pane_current_path.sh ~/scripts/tmux_pane_current_path.sh diff --git a/scripts/tmux_pane_current_path.sh b/scripts/tmux_pane_current_path.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +# Customize tmux's {pane_current_path} variable + +if [ $1 = $HOME ]; then + echo "~" +elif [ $1 = "/" ]; then + echo "/" +else + echo $(basename $1)/ +fi