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
0ac593a2
Commit
0ac593a2
authored
Nov 03, 2015
by
Bruno
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #150 from derekstavis/autoload-erase-no-copy
autoload: Use `set -e` to remove components from paths
parents
06b6b55a
bf44c45c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
10 deletions
+4
-10
lib/autoload.fish
lib/autoload.fish
+4
-10
No files found.
lib/autoload.fish
View file @
0ac593a2
...
...
@@ -43,16 +43,10 @@ function autoload -d "Manipulate autoloading path components"
end
if set -q erase
not contains -- "$path" $$dest; and continue
# Make a copy of function path selected above
set -l function_path $$dest
set -l index (contains -i -- $path $function_path)
set -e function_path[$index]
# Set function path to modified copy
set $dest $function_path
set return_success
if set -l index (contains -i -- $path $$dest)
set -e {$dest}[$index]
set return_success
end
else
set return_success
contains -- "$path" $$dest; and continue
...
...
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