Last active
August 29, 2015 14:05
-
-
Save kidpixo/be37766ef8c1dcd1533e to your computer and use it in GitHub Desktop.
jump for fish: marks function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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