]> 105106.c2e0p.group Git - dotfiles.git/blobdiff - zsh_aliases
Added lldbinit and kdp-remote commands.
[dotfiles.git] / zsh_aliases
index f3307028ed3a578bb76c49721eca2be786108916..1728fa30dc36d3856a8acf9fae7633aa624b4a1b 100644 (file)
@@ -74,3 +74,14 @@ function ssh-learn() {
     sed -i "" "/^$1,/d" ~/.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
+}