diff --git a/includes/bash_aliases.bash b/includes/bash_aliases.bash index bdb09fb..ba56fd6 100644 --- a/includes/bash_aliases.bash +++ b/includes/bash_aliases.bash @@ -102,6 +102,9 @@ gi() { grunt-init $@; } alias venv='test -d ENV && source ./ENV/bin/activate || echo "No Virtualenv in the current folder."' alias venv-init='test -d ENV && echo "Virtualenv already exists." || virtualenv --no-site-packages ENV; venv' +# Restart Linux service +rstr() { sudo service $@ restart } + # Magic Project Opener function proj { cd "$("$HOME/dotfiles/bin/opener.py" "$HOME/Dropbox/Projects" $1 -w project $2)"; } function repo { cd "$("$HOME/dotfiles/bin/opener.py" "$HOME/Dropbox/Projects" $1 -w repo $2)"; } diff --git a/includes/bash_functions.bash b/includes/bash_functions.bash index 70098ac..71c8133 100644 --- a/includes/bash_functions.bash +++ b/includes/bash_functions.bash @@ -111,8 +111,7 @@ ssh-key() { ssh-keygen -t rsa fi - cat "$file" | c - echo "Your public key copied to clipboard." + cat "$file" } # Create an SSH key and uploads it to the given host @@ -297,6 +296,6 @@ function sayit() { } # Add special aliases that will copy result to clipboard (escape → escape+) -for cmd in password hex2hsl hex2rgb escape codepoint; do +for cmd in password hex2hsl hex2rgb escape codepoint ssh-key; do eval "function $cmd+() { $cmd \$@ | c; }" done