Bash: few tweaks.

This commit is contained in:
Artem Sapegin 2013-03-14 23:22:32 +04:00
parent bf1caa5979
commit 9120b0d311
2 changed files with 5 additions and 3 deletions

View File

@ -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)"; }

View File

@ -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