summaryrefslogtreecommitdiff
path: root/fish/functions
diff options
context:
space:
mode:
authortmu <t.man.atl.2012@gmail.com>2023-12-16 13:25:40 -0800
committertmu <t.man.atl.2012@gmail.com>2023-12-16 13:25:40 -0800
commite74225a8182ed9910d9cbdaca902d04199495b1a (patch)
tree0c1397e1715c4fb2f7027408b31d5aa8121bb3da /fish/functions
parenta04213e2c04a98c204c5e51dcf0219a4286113bf (diff)
fish
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