diff --git a/plugins/balias/README.md b/plugins/balias/README.md deleted file mode 100644 index 348cf1e..0000000 --- a/plugins/balias/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# A better alias provide completion - -Use `balias` instead of `alias`,you can get same completion meanwhile you set alias. - -# Example - -``` -balias apti 'sudo apt-get install' -balias gc 'git checkout' -``` - -Then,you will get - -![apti](http://www.geekpics.net/images/2014/08/23/TJn6kfBY.png) - -![gc](http://www.geekpics.net/images/2014/08/23/655x76xcPJolvxqra.png.pagespeed.ic.4S9hgPfZ53.png) diff --git a/plugins/balias/balias.fish b/plugins/balias/balias.fish deleted file mode 100644 index a80c725..0000000 --- a/plugins/balias/balias.fish +++ /dev/null @@ -1,10 +0,0 @@ -function balias --argument alias command - eval 'alias $alias $command' - if expr $command : '^sudo '>/dev/null - set command (echo "$command" | cut -c6-) - end - complete -c $alias -xa "( - set -l cmd (commandline -pc | sed -e 's/^ *\S\+ *//' ); - complete -C\"$command \$cmd\"; - )" -end diff --git a/plugins/balias/balias.spec.fish b/plugins/balias/balias.spec.fish deleted file mode 100644 index e1cd347..0000000 --- a/plugins/balias/balias.spec.fish +++ /dev/null @@ -1,36 +0,0 @@ -import plugins/fish-spec -import plugins/balias - -function describe_library -d "balias: better-alias" - - function after_all - functions -e changedir - functions -e ls_as_root - end - - function it_doesnt_fail - balias changedir cd - expect $status --to-equal 0 - end - - function it_defines_an_alias - balias changedir cd - set -l ignore_output (functions changedir) - expect $status --to-equal 0 - end - - function you_can_use_the_alias - mkdir testdir - changedir testdir - expect test $status --to-be-true - cd .. - rmdir testdir - end - - function it_chops_off_sudo - balias ls_as_root 'sudo ls' - expect test $status --to-be-true - end -end - -spec.run $argv