Move internal runtime functions to layout-helpers.sh file

This commit is contained in:
2012-04-30 02:12:01 +01:00
parent addb754ac7
commit 1fc854dbdd
2 changed files with 24 additions and 24 deletions

View File

@@ -162,3 +162,27 @@ finalize_and_go_to_session() {
__go_to_session
fi
}
#
# Internal functions
#
# Expands given path.
#
# Example:
#
# $ __expand_path "~/Projects"
# /Users/jimeh/Projects
#
__expand_path() {
echo $(eval echo "$@")
}
__go_to_session() {
if [ -z $TMUX ]; then
tmux -u attach-session -t "$session"
else
tmux -u switch-client -t "$session"
fi
}

View File

@@ -10,27 +10,3 @@ session_root="$HOME"
# Load layout helper functions.
source "$TMUXIFIER/lib/layout-helpers.sh"
#
# Internal functions
#
# Expands given path.
#
# Example:
#
# $ __expand_path "~/Projects"
# /Users/jimeh/Projects
#
__expand_path() {
echo $(eval echo "$@")
}
__go_to_session() {
if [ -z $TMUX ]; then
tmux -u attach-session -t "$session"
else
tmux -u switch-client -t "$session"
fi
}