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
5764f0d9
Commit
5764f0d9
authored
Mar 19, 2016
by
Itzik Ephraim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
`omf doctor` checks for fish & git versions
Minimum fish version: 2.2.0 Minimum git version: 1.9.5
parent
8de7eb4c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
1 deletion
+38
-1
pkg/omf/functions/core/omf.doctor.fish
pkg/omf/functions/core/omf.doctor.fish
+35
-1
pkg/omf/functions/util/omf.check.version.fish
pkg/omf/functions/util/omf.check.version.fish
+3
-0
No files found.
pkg/omf/functions/core/omf.doctor.fish
View file @
5764f0d9
...
...
@@ -3,7 +3,6 @@ function __omf.doctor.theme
echo (omf::err)"Warning: "(omf::off)(omf::em)"fish_prompt.fish"(omf::off)" is overridden."
echo (omf::em)" fish_config"(omf::off)" command persists the prompt to "(omf::em)"~/.config/fish/functions/fish_prompt.fish"(omf::off)
echo " That file takes precedence over Oh My Fish's themes. Remove the file to fix it:"
echo (omf::em)" rm ~/.config/fish/functions/fish_prompt.fish"(omf::off)
echo
...
...
@@ -13,7 +12,42 @@ function __omf.doctor.theme
return 0
end
function __omf.doctor.fish_version
set -l min_version 2.2.0
set -l current_version
begin
set -l IFS '-'
echo $FISH_VERSION | read -la version_parts
set current_version "$version_parts[1]"
end
if not omf.check.version $min_version $current_version
echo (omf::err)"Warning: "(omf::off)"Oh-My-Fish requires "(omf::em)"fish"(omf::off)" version "(omf::em)"$min_version"(omf::off)" or above"
echo "Your fish version is "(omf::em)$FISH_VERSION(omf::off)
echo
return 1
end
end
function __omf.doctor.git_version
set -l min_version 1.9.5
set -l current_version
begin
git --version | read -la version_parts
set current_version "$version_parts[3]"
end
if not omf.check.version $min_version $current_version
echo (omf::err)"Warning: "(omf::off)"Oh-My-Fish requires "(omf::em)"git"(omf::off)" version "(omf::em)"$min_version"(omf::off)" or above"
echo "Your git version is "(omf::em)$current_version(omf::off)
echo
return 1
end
end
function omf.doctor
__omf.doctor.fish_version; or set -l doctor_failed
__omf.doctor.git_version; or set -l doctor_failed
__omf.doctor.theme; or set -l doctor_failed
if set -q doctor_failed
...
...
pkg/omf/functions/util/omf.check.version.fish
0 → 100644
View file @
5764f0d9
function omf.check.version -a min_version -a current_version
test (echo "$min_version"\n"$current_version" | tr '.' ' ' | sort -n | head -n1) = (echo "$min_version" | tr '.' ' ')
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