Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
O
oh-my-fish
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
oh-my-fish
Commits
d6024ce6
Commit
d6024ce6
authored
Jan 09, 2014
by
Charles Thorley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Two-space indentation
parent
2bf2e10d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
60 additions
and
60 deletions
+60
-60
plugins/jump/jump.fish
plugins/jump/jump.fish
+7
-7
plugins/jump/jump.load
plugins/jump/jump.load
+1
-1
plugins/jump/mark.fish
plugins/jump/mark.fish
+19
-19
plugins/jump/marks.fish
plugins/jump/marks.fish
+23
-23
plugins/jump/unmark.fish
plugins/jump/unmark.fish
+10
-10
No files found.
plugins/jump/jump.fish
View file @
d6024ce6
function jump
if test (count $argv) -ne 1
echo "Usage: jump <MARK_NAME>"
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
if test -d $MARKPATH/$argv[1] -a -L $MARKPATH/$argv[1]
cd $MARKPATH/$argv[1]
else
echo "No such mark: $argv[1]"
end
echo "No such mark: $argv[1]"
end
end
end
plugins/jump/jump.load
View file @
d6024ce6
set -x MARKPATH $HOME/.marks
set -
g
x MARKPATH $HOME/.marks
command mkdir -p $MARKPATH
plugins/jump/mark.fish
View file @
d6024ce6
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
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
plugins/jump/marks.fish
View file @
d6024ce6
function marks
if test (count $argv) -gt 0
echo "Usage: 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 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)
for mark_name in $mark_list
cd $MARKPATH/$mark_name
set -l real_path (pwd)
echo "$mark_name -> $real_path"
end
cd $current_dir
end
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)
for mark_name in $mark_list
cd $MARKPATH/$mark_name
set -l real_path (pwd)
echo "$mark_name -> $real_path"
end
cd $current_dir
end
end
end
end
plugins/jump/unmark.fish
View file @
d6024ce6
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
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment