[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 0f3a7ff2a57c89d489e86eecbc0dedc64b7c4703
Ville Skyttä
ville.skytta at iki.fi
Sat Oct 23 20:04:04 UTC 2010
The following commit has been merged in the master branch:
commit 5d7a13e05b2cab304c2bedfa924c56e35ae0780d
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Sat Oct 23 21:42:00 2010 +0300
Complete MAC addresses also from /etc/ethers.
diff --git a/CHANGES b/CHANGES
index b75b821..6c0b4ed 100644
--- a/CHANGES
+++ b/CHANGES
@@ -28,6 +28,7 @@ bash-completion (2.x)
* Fixes to completions for filenames containing tabs (RedHat: #629518).
* Add *.m2t and *.m2ts to xine-based player filename completions
(Alioth: #312770).
+ * Add /etc/ethers to MAC address completion sources.
[ Freddy Vulto ]
* Added _tilde(), fix ~username completion (Alioth: #312613, Debian: #587095)
diff --git a/bash_completion b/bash_completion
index 24c9d3f..81ec62a 100644
--- a/bash_completion
+++ b/bash_completion
@@ -712,6 +712,10 @@ _mac_addresses()
"s/.*[[:space:]]\($re\)[[:space:]].*/\1/p" -ne \
"s/.*[[:space:]]\($re\)[[:space:]]*$/\1/p" ) )
+ # /etc/ethers
+ COMPREPLY=( "${COMPREPLY[@]}" $( sed -ne \
+ "s/^[[:space:]]*\($re\)[[:space:]].*/\1/p" /etc/ethers 2>/dev/null ) )
+
COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- "$cur" ) )
__ltrim_colon_completions "$cur"
}
--
bash-completion
More information about the Bash-completion-commits
mailing list