Files
dotfiles/env/.config/zsh/functions/tns

18 lines
415 B
Bash
Executable File

#!/usr/bin/env zsh
# Create a tmux session.
#
# This accepts a path argument that is used to create the tmux session
# in, using it's basename for the session name.
#
# If an argument is not supplied, then we will create a tmux session in
# the current working directory.
function tns() {
local directory=$1
if [ -n "$directory" ]; then
directory=${PWD}
fi
tmux-sessionator --directory "$directory"
}