⚡ refacts bash/profile setup
This commit is contained in:
14
.bash/shell/complete-alias/tests/test_escape_function.sh
Normal file
14
.bash/shell/complete-alias/tests/test_escape_function.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
## ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
## test escaped command in alias body; complete with function;
|
||||
##
|
||||
## . test_escape_function.sh
|
||||
## test_escape_function <tab>
|
||||
##
|
||||
## ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
complete -F _known_hosts '/tmp/aaa\ \ \ bbb'
|
||||
alias test_escape_function='/tmp/aaa\ \ \ bbb'
|
||||
complete -F _complete_alias test_escape_function
|
||||
|
||||
14
.bash/shell/complete-alias/tests/test_escape_option.sh
Normal file
14
.bash/shell/complete-alias/tests/test_escape_option.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
## ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
## test escaped command in alias body; complete with option;
|
||||
##
|
||||
## . test_escape_option.sh
|
||||
## test_escape_option <tab>
|
||||
##
|
||||
## ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
complete -u '/tmp/aaa\ \ \ bbb'
|
||||
alias test_escape_option='/tmp/aaa\ \ \ bbb'
|
||||
complete -F _complete_alias test_escape_option
|
||||
|
||||
15
.bash/shell/complete-alias/tests/test_non_alias.sh
Normal file
15
.bash/shell/complete-alias/tests/test_non_alias.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
## ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
## test non-alias command;
|
||||
##
|
||||
## . test_non_alias.sh
|
||||
## test_non_alias <tab>
|
||||
##
|
||||
## ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
alias ls="ls --color=auto"
|
||||
alias sudo="sudo "
|
||||
alias test_non_alias="sudo /bin/ls"
|
||||
complete -F _complete_alias test_non_alias
|
||||
|
||||
14
.bash/shell/complete-alias/tests/test_quotes_function.sh
Normal file
14
.bash/shell/complete-alias/tests/test_quotes_function.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
## ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
## test quoted command in alias body; complete with function;
|
||||
##
|
||||
## . test_quotes_function.sh
|
||||
## test_quotes_function <tab>
|
||||
##
|
||||
## ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
complete -F _known_hosts '"/tmp/aaa bbb"'
|
||||
alias test_quotes_function='"/tmp/aaa bbb"'
|
||||
complete -F _complete_alias test_quotes_function
|
||||
|
||||
14
.bash/shell/complete-alias/tests/test_quotes_option.sh
Normal file
14
.bash/shell/complete-alias/tests/test_quotes_option.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
## ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
## test quoted command in alias body; complete with option;
|
||||
##
|
||||
## . test_quotes_option.sh
|
||||
## test_quotes_option <tab>
|
||||
##
|
||||
## ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
complete -u '"/tmp/aaa bbb"'
|
||||
alias test_quotes_option='"/tmp/aaa bbb"'
|
||||
complete -F _complete_alias test_quotes_option
|
||||
|
||||
Reference in New Issue
Block a user