My collection of bash scripts.
- fzf
- sd
- fd
- tmux
- openssl
- demo
- Dir structure
~/
~/config <-- [S]
~/config/* <-- [S]
~/me <-- [S]
~/me/* <-- [S]
~/ew <-- [S]
~/ew/* <-- [S]
~/work <-- [S]
~/work/* <-- [S]
[S] = Searchable upto level 1
- List search directory
# For me
echo "~/.config" >> ~/.my-tmux-session-default
echo "~/me" >> ~/.my-tmux-session-default
echo "~/ew" >> ~/.my-tmux-session-default
my-tmux-session
my-tmux-session default
# For work
echo "~/work" >> ~/.config/.my-tmux-session-work
my-tmux-session work
# For something...
echo "~/something" >> ~/.config/my-bash-jazz/.my-tmux-session-something
my-tmux-session something
- Add additional directory
echo "~/Downloads" >> ~/.my-tmux-session-default-additional
echo "~/Pictures" >> ~/.my-tmux-session-default-additional
my-tmux-session
my-tmux-session default
- demo
# For me
echo "local-server = ssh [email protected]" >> ~/.my-ssh-default
my-ssh
my-ssh default
my-ssh default copy
# For work
echo "work-server = ssh [email protected]" >> ~/.config/.my-ssh-work
my-ssh work
my-ssh work copy
# For something...
echo "something-server = ssh [email protected]" >> ~/.config/my-bash-jazz/.my-ssh-something
my-ssh something
my-ssh something copy
# .bash_aliases
alias a="tmux attach -d"
alias t="$HOME/.config/my-bash-jazz/bin/my-tmux-session"
alias tw="$HOME/.config/my-bash-jazz/bin/my-tmux-session work"
alias s="$HOME/.config/my-bash-jazz/bin/my-ssh"
alias sw="$HOME/.config/my-bash-jazz/bin/my-ssh work"
alias s-copy="$HOME/.config/my-bash-jazz/bin/my-ssh default copy"
alias sw-copy="$HOME/.config/my-bash-jazz/bin/my-ssh work copy"
# .bashrc or .zshrc
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
- Clone the repository
git clone https://github.com/susonwaiba/my-bash-jazz ~/.config/my-bash-jazz
- Give permission to execute
sudo chmod +x ~/.config/my-bash-jazz/bin/*
- Export PATH variable
# vim .bashrc or .zshrc
export PATH="$PATH:$HOME/.config/my-bash-jazz/bin";
cd ~/.config/my-bash-jazz/
git pull origin main