summaryrefslogtreecommitdiff
path: root/fish/functions
diff options
context:
space:
mode:
Diffstat (limited to 'fish/functions')
-rw-r--r--fish/functions/autojump.fish12
1 files changed, 12 insertions, 0 deletions
diff --git a/fish/functions/autojump.fish b/fish/functions/autojump.fish
new file mode 100644
index 0000000..a265845
--- /dev/null
+++ b/fish/functions/autojump.fish
@@ -0,0 +1,12 @@
+function j
+ set new_path (autojump $argv)
+
+ if test -d "$new_path"
+ echo $new_path
+ cd "$new_path"
+ else
+ echo "autojump: directory '$argv' not found"
+ echo "Try \`autojump --help\` for more information."
+ false
+ end
+end