about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2016-08-02T19·33-0400
committerWilliam Carroll <wpcarro@gmail.com>2016-08-02T19·33-0400
commitd4ad5a153bbb8598c360e72c80622c07626a136b (patch)
tree6761175a27d0d0cb473873dd2d2f7553aa1ee16c
parentef66ce6ff4eda2a8c3991eb8c50bfa430a7c1590 (diff)
Adds functions for managing directories
-rw-r--r--.misc_functions.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/.misc_functions.sh b/.misc_functions.sh
index e775c2a890dd..d8be9ba9eb25 100644
--- a/.misc_functions.sh
+++ b/.misc_functions.sh
@@ -6,8 +6,23 @@ function wdownload {
   wget -O /tmp/"$FILENAME" $URL >/dev/null && open /tmp && echo "Downloaded to: /tmp/$FILENAME" || echo "Error ..."
 }
 
+
 # spell checker
 function wspcheck {
   if [ $# -ge 1 -a -f "$1" ] && input="$1" || input="-"
   cat "$input" | tr '[:upper:]' '[:lower:]' | tr -cd '[:alpha:]_ \n' | tr -s ' ' '\n' | sort | comm -23 - ~/english_words.txt
 }
+
+
+# fuzzily search through dirs stack
+function wfd {
+  dir=$(dirname $(fzf)) && pushd "$dir" >/dev/null
+}
+
+
+# pushd into a directory on your dirs stack
+function wpushd {
+  dir=$(dirs | tr ' ' '\n' | fzf | dirname) && pushd "$dir"
+}
+
+