Last active
December 22, 2015 00:59
-
-
Save lucacervasio/6393682 to your computer and use it in GitHub Desktop.
Revisions
-
lucacervasio revised this gist
Aug 30, 2013 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,5 @@ # I made some small changes to this: http://jeroenjanssens.com/2013/08/16/quickly-navigate-your-filesystem-from-the-command-line.html # to install: curl https://raw.github.com/gist/6393682 >> ~/.bashrc; mkdir ~/.marks export MARKPATH=$HOME/.marks -
lucacervasio revised this gist
Aug 30, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ function mark { mkdir -p "$MARKPATH"; ln -s "$(pwd)" "$MARKPATH/$1" } function unmark { rm -f "$MARKPATH/$1" } # linux -
lucacervasio revised this gist
Aug 30, 2013 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,8 @@ # I made some small changes to this: http://jeroenjanssens.com/2013/08/16/quickly-navigate-your-filesystem-from-the-command-line.html # to install run: # curl https://gist.github.com/lucacervasio/6393682/raw/ed29372885669a68597701db58f95a50db2d7426/gistfile1.txt >> ~/.bashrc; mkdir ~/.marks export MARKPATH=$HOME/.marks function jump { cd -P "$MARKPATH/$1" 2>/dev/null || echo "No such mark: $1" -
lucacervasio renamed this gist
Aug 30, 2013 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,6 @@ # I made some small changes to this http://jeroenjanssens.com/2013/08/16/quickly-navigate-your-filesystem-from-the-command-line.html # curl https://gist.github.com/lucacervasio/6393682/raw/ed29372885669a68597701db58f95a50db2d7426/gistfile1.txt >> ~/.bashrc; mkdir ~/.marks export MARKPATH=$HOME/.marks function jump { cd -P "$MARKPATH/$1" 2>/dev/null || echo "No such mark: $1" -
lucacervasio revised this gist
Aug 30, 2013 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ function mark { mkdir -p "$MARKPATH"; ln -s "$(pwd)" "$MARKPATH/$1" } function unmark { rm "$MARKPATH/$1" } # linux @@ -26,4 +26,5 @@ _completemarks() { return 0 } alias j=jump complete -F _completemarks jump unmark j -
lucacervasio created this gist
Aug 30, 2013 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ export MARKPATH=$HOME/.marks function jump { cd -P "$MARKPATH/$1" 2>/dev/null || echo "No such mark: $1" } function mark { mkdir -p "$MARKPATH"; ln -s "$(pwd)" "$MARKPATH/$1" } function unmark { rm -i "$MARKPATH/$1" } # linux function marks { ls -l "$MARKPATH" | sed 's/ / /g' | cut -d' ' -f9- | sed 's/ -/\t-/g' && echo } # osx #function marks { # \ls -l "$MARKPATH" | tail -n +2 | sed 's/ / /g' | cut -d' ' -f9- | awk -F ' -> ' '{printf "%-10s -> %s\n", $1, $2}' #} _completemarks() { local curw=${COMP_WORDS[COMP_CWORD]} local wordlist=$(find $MARKPATH -type l -printf "%f\n") COMPREPLY=($(compgen -W '${wordlist[@]}' -- "$curw")) return 0 } complete -F _completemarks jump unmark