Add wip
This is where all my works in progress are going to go. Expect it to be really messy.
This commit is contained in:
parent
e55d438495
commit
7151ad9630
|
@ -0,0 +1,37 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
option_one() {
|
||||
set -o emacs
|
||||
bind 'set show-all-if-ambiguous on'
|
||||
bind 'set completion-ignore-case on'
|
||||
|
||||
COMP_WORDBREAKS=${COMP_WORDBREAKS//:/}
|
||||
|
||||
bind 'TAB:dynamic-complete-history'
|
||||
|
||||
urls=(http://example.com http://sample.net http://example.org)
|
||||
|
||||
for i in "${urls[@]}"; do
|
||||
history -s "$i"
|
||||
done
|
||||
|
||||
echo "${urls[@]}"
|
||||
|
||||
compgen -W "${urls[@]}" http://sa
|
||||
read -rep "> "
|
||||
|
||||
echo "$REPLY"
|
||||
}
|
||||
|
||||
tab(){ # requires bash 4+
|
||||
READLINE_LINE=foobar
|
||||
READLINE_POINT="${#READLINE_LINE}"
|
||||
}
|
||||
|
||||
option_two() {
|
||||
set -o emacs
|
||||
bind -x '"\t":"tab"'
|
||||
read -rep "> "
|
||||
}
|
||||
|
||||
option_two "$@"
|
Loading…
Reference in New Issue