You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
295 B
Fish
11 lines
295 B
Fish
10 years ago
|
function balias --argument alias command
|
||
|
eval 'alias $alias $command'
|
||
10 years ago
|
if expr $command : '^sudo '>/dev/null
|
||
10 years ago
|
set command (echo "$command" | cut -c6-)
|
||
10 years ago
|
end
|
||
|
complete -c $alias -xa "(
|
||
|
set -l cmd (commandline -pc | sed -e 's/^ *\S\+ *//' );
|
||
|
complete -C\"$command \$cmd\";
|
||
|
)"
|
||
|
end
|