feat: manage versions with asdf
This commit is contained in:
@@ -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