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
75ba7639
Commit
75ba7639
authored
Jan 10, 2015
by
Bruno Pinto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+bucaran array.delete
parent
7c9d660f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
21 deletions
+15
-21
plugins/fish-spec/array.delete.fish
plugins/fish-spec/array.delete.fish
+8
-0
test/helper.fish
test/helper.fish
+0
-7
test/test_oh-my-fish.fish
test/test_oh-my-fish.fish
+7
-14
No files found.
plugins/fish-spec/array.delete.fish
0 → 100644
View file @
75ba7639
# Remove item from list. List must be the name of a global variable.
# @params <item> <list>
function array.delete
set -l item $argv[1]
if set -l index (contains -i -- $item $$argv[2])
set -e $argv[2][$index]
end
end
test/helper.fish
deleted
100644 → 0
View file @
7c9d660f
set -l fish_tank /usr/local/share/fish-tank/tank.fish
if not test -e $fish_tank
echo 'error: fish-tank is required to run these tests (https://github.com/terlar/fish-tank)'
exit 1
end
source $fish_tank
test/test_oh-my-fish.fish
View file @
75ba7639
...
...
@@ -32,13 +32,16 @@ function describe_oh_my_fish
end
function it_loads_all_oh_my_fish_functions
remove_from_array "$fish_path/functions/" fish_function_path
array.delete "$fish_path/functions/" fish_function_path
load_oh_my_fish
expect $fish_function_path to_include $fish_path/functions/
end
function it_loads_all_selected_plugins
remove_from_array "$fish_path/plugins/z" fish_function_path
array.delete "$fish_path/plugins/bak" fish_function_path
array.delete "$fish_path/plugins/z" fish_function_path
set fish_plugins bak z
load_oh_my_fish
expect $fish_function_path to_include $fish_path/plugins/bak and
...
...
@@ -46,7 +49,8 @@ function describe_oh_my_fish
end
function it_loads_the_selected_theme
remove_from_array "$fish_path/themes/l" fish_function_path
array.delete "$fish_path/themes/l" fish_function_path
set fish_theme l
load_oh_my_fish
expect $fish_function_path to_include $fish_path/themes/l
...
...
@@ -57,15 +61,4 @@ function load_oh_my_fish
. $fish_path/oh-my-fish.fish
end
function remove_from_array
set -l element $argv[1]
for i in (seq (count $$argv[2]))
if test $$argv[2][$i] = $element
set -e $argv[2][$i]
break
end
end
end
import plugins/fish-spec
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