Skip to content

Instantly share code, notes, and snippets.

@kidpixo
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kidpixo/be37766ef8c1dcd1533e to your computer and use it in GitHub Desktop.
Save kidpixo/be37766ef8c1dcd1533e to your computer and use it in GitHub Desktop.
jump for fish: marks function
function marks
if test (count $argv) -gt 0
echo "Usage: marks"
else
set -l file_list (command ls $MARKPATH)
if test (count $file_list) -eq 0
echo "No marks currently defined."
else
set -l mark_list
for file in $file_list
if test -d $MARKPATH/$file -a -L $MARKPATH/$file
set mark_list $mark_list $file
end
end
if test (count $mark_list) -eq 0
echo "No marks currently defined."
else
for mark_name in $mark_list
echo -e "\e[35m$mark_name\e[0m -> "(readlink $MARKPATH/$mark_name)
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment