mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2025-01-22 09:26:14 +08:00
15 lines
359 B
Fish
15 lines
359 B
Fish
function omf.git
|
|
switch $argv[1]
|
|
case '--clone'
|
|
set -l repo_url $argv[2]
|
|
set -l path $argv[3]
|
|
|
|
git clone --quiet $repo_url $path ^ /tmp/oh-my-fish.clone.log
|
|
case '--update'
|
|
set -l path $argv[2]
|
|
return (cd $path; and git pull --rebase > /dev/null; echo $status)
|
|
case '*'
|
|
omf.log red 'Unknown option'
|
|
end
|
|
end
|