Last active
October 10, 2022 06:20
This file contains 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
# 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