mirror of
https://github.com/oh-my-fish/oh-my-fish
synced 2024-11-03 15:40:32 +00:00
Bug fixes
This commit is contained in:
parent
89655b2edf
commit
930753ddbe
@ -3,9 +3,10 @@ function mark
|
||||
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 -
|
||||
cd $current_dir
|
||||
else
|
||||
echo "$argv[2] is not a valid directory."
|
||||
end
|
||||
|
@ -2,21 +2,26 @@ function marks
|
||||
if test (count $argv) -gt 0
|
||||
echo "Usage: marks"
|
||||
else
|
||||
set -l file_list (command ls $MARKPATH/)
|
||||
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
|
||||
set -l file_list (command ls $MARKPATH)
|
||||
if test (count $file_list) -eq 0
|
||||
echo "No marks currently defined."
|
||||
else
|
||||
for mark_name in $mark_list
|
||||
cd $MARKPATH/$mark_name
|
||||
set -l real_path (pwd)
|
||||
cd -
|
||||
echo "$mark_name -> $real_path"
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user