[split] Move jump plugin to oh-my-fish/plugin-jump

https://github.com/oh-my-fish/plugin-jump
This commit is contained in:
Justin Hileman 2015-05-31 08:30:48 -07:00
parent 6d03e2f070
commit 399ae64df8
6 changed files with 0 additions and 88 deletions

View File

@ -1,7 +0,0 @@
jump
====
A port of [Jeroen Janssens' "jump" utility] [1] to the fish shell (and [Oh My Fish!] [2]).
[1]: http://jeroenjanssens.com/2013/08/16/quickly-navigate-your-filesystem-from-the-command-line.html
[2]: https://github.com/bpinto/oh-my-fish

View File

@ -1,11 +0,0 @@
function jump
if test (count $argv) -ne 1
echo "Usage: jump <MARK_NAME>"
else
if test -d $MARKPATH/$argv[1] -a -L $MARKPATH/$argv[1]
cd $MARKPATH/$argv[1]
else
echo "No such mark: $argv[1]"
end
end
end

View File

@ -1,5 +0,0 @@
set -gx MARKPATH $HOME/.marks
command mkdir -p $MARKPATH
complete -c jump -f -a '(ls ~/.marks)'
complete -c unmark -f -a '(ls ~/.marks)'

View File

@ -1,22 +0,0 @@
function mark
if test (count $argv) -eq 0 -o (count $argv) -gt 2
echo "Usage: mark <MARK_NAME> [DIRECTORY]"
else if test -e $MARKPATH/$argv[1]
if test -d $MARKPATH/$argv[1] -a -L $MARKPATH/$argv[1]
echo "A mark named $argv[1] already exists."
else
echo "$MARKPATH/$argv[1] already exists."
end
else 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]
set -l current_dir (pwd)
cd $argv[2]
command ln -s (pwd) $MARKPATH/$argv[1]
cd $current_dir
else
echo "$argv[2] is not a valid directory."
end
end
end

View File

@ -1,30 +0,0 @@
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
set -l current_dir (pwd)
set -l output ""
for mark_name in $mark_list
cd $MARKPATH/$mark_name
set -l real_path (pwd)
set output "$output$mark_name -> $real_path"\n
end
echo $output | column -t
cd $current_dir
end
end
end
end

View File

@ -1,13 +0,0 @@
function unmark
if test (count $argv) -eq 0
echo "Usage: unmark <MARK_NAME>..."
else
for mark_name in $argv
if test -d $MARKPATH/$mark_name -a -L $MARKPATH/$mark_name
command rm -i $MARKPATH/$mark_name
else
echo "No such mark: $mark_name"
end
end
end
end