Patch-ID: bash41-003
[bash.git] / examples / scripts.noah / meta.bash
blob6121726ffb6d3909fceed92e129807aa8a417a26
1 # meta.bash --- meta key frobnications
2 # Author: Noah Friedman <friedman@prep.ai.mit.edu>
3 # Created: 1992-06-28
4 # Last modified: 1993-01-26
5 # Public domain
7 # Commentary:
8 # Code:
10 #:docstring meta:
11 # Usage: meta [on|off]
13 # An argument of "on" will make bash use the 8th bit of any input from
14 # a terminal as a "meta" bit, i.e bash will be able to use a real meta
15 # key.
17 # An argument of "off" causes bash to disregard the 8th bit, which is
18 # assumed to be used for parity instead.
19 #:end docstring:
21 function meta ()
23 case "$1" in
24 on) bind 'set input-meta On'
25 bind 'set output-meta on'
26 bind 'set convert-meta off' ;;
27 off) bind 'set input-meta Off'
28 bind 'set output-meta off'
29 bind 'set convert-meta on' ;;
30 *) echo "Usage: meta [on|off]" 1>&2 ; return 1 ;;
31 esac
32 return 0
35 provide meta
37 # meta.bash ends here