You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
oh-my-fish/plugins/jump/mark.fish

16 lines
401 B
Fish

11 years ago
function mark
if test (count $argv) -eq 1
command ln -s (pwd) $MARKPATH/$argv[1]
else if test (count $argv) -eq 2
if test -d $argv[2]
cd $argv[2]
command ln -s (pwd) $MARKPATH/$argv[1]
cd -
else
echo "$argv[2] is not a valid directory."
end
else
echo "Usage: mark <MARK_NAME> [DIRECTORY]"
end
end