all repos — dotfiles @ 80e2a806c30ffd3e1f61d032c2276e4e86583f04

my *nix dotfiles

config/fish/functions/marks.fish (view raw)

 1set -gx MARKPATH ~/.marks
 2
 3function mark
 4    mkdir -p $MARKPATH
 5    ln -s $PWD $MARKPATH/$argv
 6end
 7
 8function unmark 
 9    rm -i $MARKPATH/(basename $PWD)
10end
11
12function marks
13    for f in $MARKPATH/*
14        printf '%s -> %s\n' (basename $f) (readlink $f)
15    end
16end
17
18function n -d 'The based jumper.'  # n because workman
19    cd (realpath $MARKPATH/$argv) 2>/dev/null || printf '%s\n' "error: no such mark $argv"
20end