feat: manage versions with asdf
This commit is contained in:
@@ -76,9 +76,10 @@ source $HOME/.dotfiles/configs/zsh/update-repo.zsh
|
||||
# The next line enables shell command completion for gcloud.
|
||||
#if [ -f '/home/coder/downloads/google-cloud-sdk/completion.zsh.inc' ]; then . '/home/coder/downloads/google-cloud-sdk/completion.zsh.inc'; fi
|
||||
|
||||
. $HOME/.asdf/asdf.sh
|
||||
. $HOME/.asdf/completions/asdf.bash
|
||||
|
||||
if [ -s "$HOME/.asdf" ]; then
|
||||
. $HOME/.asdf/asdf.sh
|
||||
. $HOME/.asdf/completions/asdf.bash
|
||||
fi
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
|
@@ -9,7 +9,7 @@ alias yoink="curl"
|
||||
|
||||
alias pls='sudo -E env "PATH=$PATH"'
|
||||
|
||||
alias zshc="cd ~/.dotfiles && vim configs/.zshrc"
|
||||
alias zshc="cd ~/.dotfiles && vim configs/.zshrc && cd -"
|
||||
alias zshu="source ~/.zshrc"
|
||||
|
||||
alias nano="nvim"
|
||||
|
@@ -2,28 +2,33 @@
|
||||
|
||||
function fp(){
|
||||
|
||||
PORT=$1;
|
||||
for p in "$@"
|
||||
do
|
||||
|
||||
if [ "$(which lsof)" = "lsof not found" ]; then
|
||||
echo "lsof not installed"
|
||||
else
|
||||
PIDS="$(lsof -t -i:$PORT)"
|
||||
|
||||
AMOUNT=$(wc -w<<<$PIDS);
|
||||
|
||||
if [ $AMOUNT = 0 ]; then
|
||||
|
||||
echo "No processes use port $PORT";
|
||||
PORT=$var;
|
||||
|
||||
if [ "$(which lsof)" = "lsof not found" ]; then
|
||||
echo "lsof not installed"
|
||||
else
|
||||
PIDS="$(lsof -t -i:$PORT)"
|
||||
|
||||
echo "Killing $AMOUNT process(es) using port $PORT";
|
||||
AMOUNT=$(wc -w<<<$PIDS);
|
||||
|
||||
echo "$PIDS" | while IFS= read -r pid ; do
|
||||
kill -9 $pid;
|
||||
done
|
||||
if [ $AMOUNT = 0 ]; then
|
||||
|
||||
echo "No processes use port $PORT";
|
||||
|
||||
else
|
||||
|
||||
echo "Killing $AMOUNT process(es) using port $PORT";
|
||||
|
||||
echo "$PIDS" | while IFS= read -r pid ; do
|
||||
kill -9 $pid;
|
||||
done
|
||||
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
}
|
||||
done
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user