From 958dc79c938ed5b1b54d66205758c7d9b29bb4f1 Mon Sep 17 00:00:00 2001 From: Bruno Fontes Date: Thu, 25 Oct 2018 14:27:06 -0300 Subject: [PATCH 1/2] Fixing cases where password were being displayed Sometimes the "echo -e "$sudoPass\n" | yes" command were displaying the password instead of confirming something. So I changed it to make one thing at a time. First I refresh the use of sudo with password, just using sudo in an echo command. So I can use the command that really needs it with not worries about asking the password. --- Pacman/updateRepositories.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Pacman/updateRepositories.sh b/Pacman/updateRepositories.sh index 78c0ac9..1ba1aba 100755 --- a/Pacman/updateRepositories.sh +++ b/Pacman/updateRepositories.sh @@ -16,16 +16,18 @@ read -s sudoPass echo s "echo '**********'" -bold "Pacman-mirrors -g" -s "pacman-mirrors -g" +bold "Pacman-mirrors -c" +s "pacman-mirrors -c Brazil Chile United_States" -bold "Updating with PACMAN..." +#bold "Updating with PACMAN..." s "pacman -Syu --color always" bold "Updating with AURMAN..." +s "echo" aurman -Su --noedit --noconfirm --color always bold "Cleaning stuff..." -echo -e "$sudoPass\n" | yes | (sudo -S pacman -Rns $(pacman -Qtdq) --color always) +s "echo" +yes | (sudo -S pacman -Rns $(pacman -Qtdq) --color always) notify-send "Update script has finished!" From 2b6ee0f696fa6742286f49936b39e5b2007dcb65 Mon Sep 17 00:00:00 2001 From: Bruno Fontes Date: Thu, 25 Oct 2018 14:30:52 -0300 Subject: [PATCH 2/2] Small fixes and add a few new alias - Fixing vagrant From time to time, after running the vagrant command path were changed to Vagrant. I fixed it by changing the && to ";" - Added "gmerge" It is just a shortcut to merge another branch to the branch I am working on. Very usefull if I have to merge it often. --- zshrc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/zshrc b/zshrc index 358451d..2a89382 100644 --- a/zshrc +++ b/zshrc @@ -102,7 +102,7 @@ alias gch='git checkout' alias gc='git commit' alias gs='git status' alias gpull='sshadd; git pull origin $(git_current_branch)' -alias gp='sshadd; git gc --auto; git push --all origin; git push --tags' +alias gp='sshadd; git gc --auto; git push --all origin; git push --tags origin' alias glog='git log --graph --oneline --decorate -n 10 --color' alias update='bash ~/Apps/linuxShortcuts/Pacman/updateRepositories.sh' alias grep='grep --color=auto' @@ -114,9 +114,10 @@ alias du='ncdu --color dark --exclude .git' alias clearLogs='sudo find /var/log -mtime +30 -type f -delete' alias vzsh='vim ~/.zshrc && source ~/.zshrc' alias ssh='sshadd; /usr/bin/ssh' +alias rm='/usr/bin/rm -I' function vagrant () { - builtin cd ~/development/laravelHomestead && /usr/bin/vagrant $* && builtin cd - + builtin cd ~/development/laravelHomestead && /usr/bin/vagrant $*; builtin cd - } function mkcd () { mkdir -p "$1" && builtin cd -P -- "$1" } @@ -124,6 +125,11 @@ function sshadd() { ssh-add -l > /dev/null || ssh-add } function le { "$1" | less } function cd { echo; builtin cd "$1"; ls --color=tty; echo; echo PWD: "$PWD" } +function gmerge() +{ + branch=$(git_current_branch); git checkout "$1"; git merge "$branch"; git checkout "$branch" +} + function extract() # Handy Extract Program. { if [ -f $1 ] ; then @@ -172,3 +178,9 @@ fi #Bruno - Keep "LESS" content on screen when exit export LESS="-XFR" + +#Bruno - Gnome keyring +if [ -n "$DESKTOP_SESSION" ];then + eval $(gnome-keyring-daemon --start) + export SSH_AUTH_SOCK +fi