fisher/functions/__fisher_alias.fish
Jorge Bucaran 707855203a Ahoy! Fisherman gets a super patch v0.3.1
This patch contains several amends for 0.3.0 and
other minor documentation corrections.  Major
documentation revision and rewrite.

fisher help shows fisher(1) by default now.

Fix a critical bug that was causing fisher uninstall
--force to remove not the symbolic link, but the
actual files. Closes #24

Rename orphan tag to custom for plugins installed
using a custom URL.

warning Remove fisher --link flag and create symbolic
links by default for local paths. The user does not
have to worry about symbolic links or whether the
copy is as symbolic link or not anymore. If the user
tries to install a local path, then the best thing
to do is to create a symbolic link. This also
eliminates the need to call update.

warning Remove fisher --cache and fisher --validate.
Now, that these options are separated into their own
function and they are intentionally private, there
is no need for them.
2016-01-10 16:13:46 +09:00

36 lines
945 B
Fish

function __fisher_alias -a value -d "Define 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