-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from fisherman/v030
Ahoy! Fisherman 0.3.0
- Loading branch information
Showing
52 changed files
with
696 additions
and
457 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# Authors | ||
* Jorge Bucaran <[[email protected]](mailto:[email protected])> | ||
* Hyeon Kim <[[email protected]](mailto:[email protected])> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.2.0 | ||
0.3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
function __fisher_alias -a value -d "Define one or more comma-separated command aliases." | ||
switch "$value" | ||
case "" | ||
if test -z "$fisher_alias" | ||
return 1 | ||
end | ||
|
||
printf "%s\n" $fisher_alias | sed 's/[=,]/ /g' | ||
|
||
case \* | ||
for value in $argv | ||
if contains -- $fisher_alias $value | ||
continue | ||
end | ||
|
||
set -g fisher_alias $fisher_alias $value | ||
|
||
set -l index $fisher_cache/.index | ||
|
||
if not test -e $index | ||
continue | ||
end | ||
|
||
for alias in (__fisher_alias) | ||
switch $alias | ||
case install\* | ||
__fisher_complete_remote $alias | ||
|
||
case update\* uninstall\* | ||
__fisher_complete_cache $alias | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
function __fisher_cache -d "Calculate path of a name, url or path relative to the cache" | ||
while read --prompt="" -l item | ||
switch "$item" | ||
case file:///\* | ||
printf "%s\n" $item | ||
|
||
case \*/\* | ||
for file in $fisher_cache/* | ||
switch "$item" | ||
case (git -C $file ls-remote --get-url | __fisher_validate) | ||
printf "%s\n" $file | ||
break | ||
end | ||
end | ||
|
||
case \* | ||
printf "%s\n" $fisher_cache/$item | ||
end | ||
end | ||
end |
22 changes: 9 additions & 13 deletions
22
functions/__fish_parse_usage.fish → functions/__fisher_complete.fish
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
function __fisher_complete_cache -d "Add auto-complete for cached plugins" | ||
set -l IFS ";" | ||
fisher_search --index=$fisher_cache/.index --select=cache --name --info \ | ||
| while read -l name info | ||
complete -c fisher -n "__fish_seen_subcommand_from $argv" -a "$name" -d "$info" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
function __fisher_complete_remote -d "Add auto-complete for remote plugins" | ||
set -l IFS ";" | ||
fisher_search --index=$fisher_cache/.index --select=remote --name --info \ | ||
| while read -l name info | ||
complete -c fisher -n "__fish_seen_subcommand_from $argv" -a "$name" -d "$info" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
function __fisher_file -a file -d "Read a fishfile and display its contents" | ||
switch "$file" | ||
case "" | ||
set file $fisher_config/fishfile | ||
|
||
case "-" | ||
set file /dev/stdin | ||
end | ||
|
||
awk ' | ||
!/^ *(#.*)*$/ { | ||
gsub("#.*", "") | ||
if (/^ *package .+/) $1 = $2 | ||
if (!duplicates[$1]++) printf("%s\n", $1) | ||
} | ||
' $file | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
function __fisher_list -d "List plugins in the cache" | ||
for file in $fisher_cache/* | ||
if test -d $file | ||
basename $file | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
function __fisher_name -d "Generate a pretty name from a plugin path or URL" | ||
sed -E 's|.*/(.*)|\1|; s/^(plugin|theme|pkg|omf|fish|fisher)-//' | ||
end |
Oops, something went wrong.