From d8930900ce078b21b2d4e7a5387b6c33f6f6aa04 Mon Sep 17 00:00:00 2001 From: LAN-TW Date: Sat, 30 Nov 2013 21:48:42 +0800 Subject: =?UTF-8?q?bash=5Finclude:=20argv[0]=E3=80=81=E9=87=8D=E8=A4=87?= =?UTF-8?q?=E5=9F=B7=E8=A1=8C=E3=80=81=E7=AD=89=E5=BE=85=E6=88=90=E5=8A=9F?= =?UTF-8?q?=E3=80=81fbterm=5Fchewing=E3=80=81=E6=9B=B4=E5=A4=9A=E6=8C=87?= =?UTF-8?q?=E4=BB=A4=E8=87=AA=E5=8B=95=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bash_include | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/bash_include b/bash_include index a5fa088..b7510a7 100644 --- a/bash_include +++ b/bash_include @@ -1316,6 +1316,41 @@ function get_memory_info () esac } +function argv0 () +{ + local execname="$1" + local argv0="$2" + shift 2 + ( exec -a "$argv0" "$execname" "$@" ) +} + +function repeat () +{ + local repeat_times="$1" + shift + for ((i=0; i>> + argv0 executable arguments ... (include argv[0]) backup_file filename ... [-- sudo_prefix ...] convert_to_html filename ... mkscreenacl usernames ... + repeat times arguments ... + wait_success arguments ... <<< Miscellaneous: Background Jobs >>> check_dmesg seconds check_system_status seconds <<< Miscellaneous: Compatibility >>> + fbterm_chewing [size] [arguments ...] gen_ms_inet_shortcut filename url unzip_nomac filenames ... <<< Miscellaneous: Personal >>> @@ -1787,6 +1826,8 @@ shopt -s checkhash shopt -s cmdhist shopt -s mailwarn +complete -A alias helpa +complete -A alias help_aliases complete -A command check_command_existent complete -A directory createdir_askmode complete -A function helpf @@ -1795,6 +1836,19 @@ complete -A variable varset complete -A variable path_editor complete -A user mkscreenacl +if check_command_existent _command; then + complete -F _command wait_success +fi + +if check_command_existent _screen; then + complete -F _screen screen256 +fi + +if check_command_existent _rpmdev_installed_packages; then + complete -F _rpmdev_installed_packages rpmdu + complete -F _rpmdev_installed_packages rpmsize +fi + ulimit -S -c unlimited 2> /dev/null [ "$interactive_shell" ] && { -- cgit v1.2.3