refacts bash/profile setup

This commit is contained in:
2026-04-21 11:19:45 +02:00
parent 5bd960d386
commit f150ed2750
52 changed files with 3446 additions and 724 deletions

View 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

View 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

View 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

View 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

View 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