aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.aliases2
-rw-r--r--.functions10
2 files changed, 10 insertions, 2 deletions
diff --git a/.aliases b/.aliases
index ff2de00..6a4cf1d 100644
--- a/.aliases
+++ b/.aliases
@@ -14,8 +14,6 @@ alias p="cd ~/Projects"
alias g="git"
alias h="history"
alias j="jobs"
-alias o="open"
-alias oo="open ."
# Detect which `ls` flavor is in use
if ls --color > /dev/null 2>&1; then # GNU `ls`
diff --git a/.functions b/.functions
index 7d2a83d..4a1e407 100644
--- a/.functions
+++ b/.functions
@@ -281,3 +281,13 @@ function v() {
vim "$@"
fi
}
+
+# `o` with no arguments opens current directory, otherwise opens the given
+# location
+function o() {
+ if [ $# -eq 0 ]; then
+ open .
+ else
+ open "$@"
+ fi
+}