* Merged Ubuntu changes:
- added quote(), quote_readline(), dequote() helper functions.
This commit is contained in:
parent
c5dd1150fc
commit
5b304bb4d6
@ -188,6 +188,26 @@ _rl_enabled()
|
||||
[[ "$( bind -v )" = *$1+([[:space:]])on* ]]
|
||||
}
|
||||
|
||||
# This function shell-quotes the argument
|
||||
quote()
|
||||
{
|
||||
echo \'${1//\'/\'\\\'\'}\' #'# Help vim syntax highlighting
|
||||
}
|
||||
|
||||
# This function quotes the argument in a way so that readline dequoting
|
||||
# results in the original argument
|
||||
quote_readline()
|
||||
{
|
||||
local t="${1//\\/\\\\}"
|
||||
echo \'${t//\'/\'\\\'\'}\' #'# Help vim syntax highlighting
|
||||
}
|
||||
|
||||
# This function shell-dequotes the argument
|
||||
dequote()
|
||||
{
|
||||
eval echo "$1"
|
||||
}
|
||||
|
||||
# Get the word to complete
|
||||
# This is nicer than ${COMP_WORDS[$COMP_CWORD]}, since it handles cases
|
||||
# where the user is completing in the middle of a word.
|
||||
|
7
debian/changelog
vendored
7
debian/changelog
vendored
@ -1,3 +1,10 @@
|
||||
bash-completion (20080617.4) UNRELEASED; urgency=low
|
||||
|
||||
* Merged Ubuntu changes:
|
||||
- added quote(), quote_readline(), dequote() helper functions.
|
||||
|
||||
-- David Paleino <d.paleino@gmail.com> Mon, 23 Jun 2008 11:00:04 +0200
|
||||
|
||||
bash-completion (20080617.3) unstable; urgency=low
|
||||
|
||||
[ David Paleino ]
|
||||
|
Loading…
x
Reference in New Issue
Block a user