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
773f1010
Commit
773f1010
authored
Sep 17, 2015
by
jeremiejig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
omf.destroy: find the most recent backup of config.
using XDG_CONFIG_HOME
parent
b9c1bd95
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
pkg/omf/cli/omf.destroy.fish
pkg/omf/cli/omf.destroy.fish
+9
-2
No files found.
pkg/omf/cli/omf.destroy.fish
View file @
773f1010
...
...
@@ -5,8 +5,15 @@ function omf.destroy -d "Remove Oh My Fish"
omf.remove_package $pkg >/dev/null ^&1
end
if test -e "$HOME/.config/fish/config.copy"
mv "$HOME/.config/fish/config".{copy,fish}
set -l fish_config $XDG_CONFIG_HOME/fish
if test "$fish_config" = "/fish"
set fish_config $HOME/.config/fish
end
set -l localbackup (find $fish_config -regextype posix-extended -regex '^.*fish/config\.[[:digit:]]+\.copy$' |\
sort -r |head -1)
if test -n $localbackup
mv $localbackup "$fish_config/config.fish"
end
if test "$OMF_PATH" != "$HOME"
...
...
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