Skip to content

Instantly share code, notes, and snippets.

@markmywords
Last active October 10, 2022 06:20
# Small collection of aliases for personal use.
# Create subdirectories automatically when necessary
alias mkdir='mkdir -vp'
# I always have to look up those flags.
alias untar='tar -zxvf '
# terminal profiles I have created.
valid_profiles="default bgtask"
# Opens a new gnome terminal tab with a predefined profile and command.
newtab(){
# check if first option is a valid profile.
if [[ $valid_profiles == *$1* ]];
then
gnome-terminal --tab-with-profile=$1 -- /bin/bash -c ${@:2}'; exec /bin/bash -i'
else
gnome-terminal --tab-with-profile=default -- /bin/bash -c $@'; exec /bin/bash -i'
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment