Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: example startup file



On May 9,  5:46pm, Oliver Kiddle wrote:
}
} Has anyone got a useful and very short user-defined zle widget we could
} add?

insert-octal () {
  # Insert the ASCII value in octal of the next character typed

  local c
  typeset -i 8 o
  typeset -Z 3 x        # Why doesn't "typeset -Z 3 -i 8 o" work?

  if read -k 1 c; then
    ((o=#c))
    x=${o#8#}
    LBUFFER="$LBUFFER\\$x"
  fi
}


-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



Messages sorted by: Reverse Date, Date, Thread, Author