X-Git-Url: https://git.phdru.name/?p=dotfiles.git;a=blobdiff_plain;f=.bashrc;h=f1614c8cc87f611affab941799080df18c507c77;hp=7a874bf93d1511cc1c6afa9e288d66d8a92d481e;hb=09f6e97ac8af6d61b40b417e577e1e6a6e64e7e4;hpb=977c52660aad856c3d4d98642f9ef6e384fbdf0b diff --git a/.bashrc b/.bashrc index 7a874bf..f1614c8 100644 --- a/.bashrc +++ b/.bashrc @@ -301,13 +301,13 @@ if [ "$SHLVL" -eq 1 -a "`type -t X`" = function ] && which startx >/dev/null 2>& # From https://stackoverflow.com/a/18839557 copy_function() { - test -n "$(declare -f "$1")" || return - eval "${_/$1/$2}" + test -n "$(declare -f "$1")" || return + eval "${_/$1/$2}" } rename_function() { - copy_function "$@" || return - unset -f "$1" + copy_function "$@" || return + unset -f "$1" } rename_function X _non_bash_X