git://105106.c2e0p.group
/
dotfiles.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add homebrew path to zsh_login
[dotfiles.git]
/
zsh_aliases
diff --git
a/zsh_aliases
b/zsh_aliases
index f3307028ed3a578bb76c49721eca2be786108916..4338eefc23cd7086b3c5f7109f9271416e008f95 100644
(file)
--- a/
zsh_aliases
+++ b/
zsh_aliases
@@
-67,10
+67,21
@@
if [[ $( has pidof ) == 'no' ]]; then
fi
function ssh-forget() {
fi
function ssh-forget() {
- sed -i "" "/^$1
,
/d" ~/.ssh/known_hosts
+ sed -i "" "/^$1
[, ]
/d" ~/.ssh/known_hosts
}
function ssh-learn() {
}
function ssh-learn() {
- sed -i "" "/^$1
,
/d" ~/.ssh/known_hosts
+ sed -i "" "/^$1
[, ]
/d" ~/.ssh/known_hosts
ssh-keyscan -t rsa $1 >> ~/.ssh/known_hosts
}
ssh-keyscan -t rsa $1 >> ~/.ssh/known_hosts
}
+
+function canonicalize() {
+ local relpath=$( dirname $1 )
+ if [[ ! -d "$relpath" ]]; then
+ echo "$0: no such file or directory: $1"
+ return 1
+ fi
+
+ echo $(cd $relpath; pwd -P)/$(basename $1)
+ return 0
+}