diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2011-03-24 10:47:14 +0100 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2011-03-24 10:47:15 +0100 |
commit | d290ff25fb277091e61bd0aa55c0b644b64b5f20 (patch) | |
tree | 2b636c9220dd3710cea781e3d2c5cb74df14cf03 /.zsh | |
parent | d72a7d09a53c3c10615337a1306efb050e88eba3 (diff) | |
download | dotfiles-d290ff25fb277091e61bd0aa55c0b644b64b5f20.tar.gz dotfiles-d290ff25fb277091e61bd0aa55c0b644b64b5f20.tar.bz2 dotfiles-d290ff25fb277091e61bd0aa55c0b644b64b5f20.zip |
Try to avoid name-clashes
Diffstat (limited to '')
-rw-r--r-- | .zsh/zshfunctions | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/.zsh/zshfunctions b/.zsh/zshfunctions index 3a10bd4..67186cd 100644 --- a/.zsh/zshfunctions +++ b/.zsh/zshfunctions @@ -75,9 +75,7 @@ open_ebuild () # Works only for simple cases cci () { - trap 'unfunction ask' EXIT - - ask () + _ask_$0 () { echo -n "Is this ok? [y/n] " @@ -105,17 +103,17 @@ cci () if [[ -n $indexed ]]; then echo ">> Stuff in index -- only commiting this" echo "$indexed" - ask || return 2 + _ask_$0 || return 2 else echo ">> Nothing in index -- commiting everything which has changed" echo "$(config status)" - ask || return 2 + _ask_$0 || return 2 config add -u fi cstg diff -O --cached - ask || return 2 + _ask_$0 || return 2 echo ">> Creating new patch" cstg new $tok -m "$message" @@ -176,11 +174,11 @@ menc() # based on a script by mv list_cc_flags() { - trap 'unfunction Usage' EXIT + local funcname=${0##*/} - Usage () + _Usage_$0 () { - printf '%s\n' "Usage: ${0##*/} c|o [gcc-Flags e.g. -march=native -O2] + printf '%s\n' "Usage: $funcname c|o [gcc-Flags e.g. -march=native -O2] Show which compile|optimization flags are selected when you chose gcc-Flags" return ${1:-1} } @@ -195,7 +193,7 @@ PROG o) shift gcc -c -Q "${@}" -o /dev/null --help=optimizer 2>&1;; - *) Usage;; + *) _Usage_$0;; esac } |