mirror of
https://github.com/chenasraf/dotfiles.git
synced 2026-05-18 09:39:04 +00:00
feat: trm function
This commit is contained in:
@@ -67,6 +67,7 @@ alias iplocal="ipconfig getifaddr en0 | prepend 'iplocal: '"
|
||||
alias ip="iplocal; ip4; ip6"
|
||||
alias afk="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend"
|
||||
# alias pkgupdate="brew update; brew upgrade; brew cleanup; npm install npm -g; npm update -g; sudo g em update --system; sudo gem update; sudo gem cleanup; sudo softwareupdate -i -a;"
|
||||
alias pkgupdate="brew update; brew upgrade; brew cleanup; pnpm i -g pnpm; pnpm up -g; sudo gem update; sudo gem cleanup"
|
||||
alias gundo="git reset --soft HEAD~1"
|
||||
alias unq="sudo xattr -rd com.apple.quarantine"
|
||||
alias scriptls="cat \$(find-up package.json) | jq '.scripts'"
|
||||
@@ -131,7 +132,6 @@ alias tas="tmux attach -t"
|
||||
alias tlw="tmux list-windows"
|
||||
alias trl="tmux source-file ~/.config/.tmux.conf"
|
||||
alias trn="tmux rename-session -t"
|
||||
alias trm="tmux kill-session -t"
|
||||
alias tk="trm"
|
||||
alias tks="tmux kill-server"
|
||||
alias txp="tx p"
|
||||
|
||||
@@ -385,6 +385,15 @@ allow-signing() {
|
||||
echo "$(git config --get user.email) namespaces=\"git\" $(cat $file)" >> ~/.ssh/allowed_signers
|
||||
}
|
||||
|
||||
trm() {
|
||||
sess=$1
|
||||
if [[ -z $sess ]]; then
|
||||
tmux kill-session
|
||||
return $?
|
||||
fi
|
||||
tmux kill-session -t $sess
|
||||
}
|
||||
|
||||
# select random element from arguments
|
||||
randarg() {
|
||||
echo "${${@}[$RANDOM % $# + 1]}"
|
||||
|
||||
Reference in New Issue
Block a user