aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Porada <porada@me.com>2012-12-03 15:28:51 +0100
committerMathias Bynens <mathias@qiwi.be>2012-12-03 18:02:46 +0100
commit5400992ced5746627b9cfec9df08a93318822acc (patch)
treef90481328f6fcd13bf923354cfddc78b8824f9c7
parent9e4f9a84258649aa061f145903ae1681af64814d (diff)
downloaddotfiles-5400992ced5746627b9cfec9df08a93318822acc.tar.gz
dotfiles-5400992ced5746627b9cfec9df08a93318822acc.tar.bz2
dotfiles-5400992ced5746627b9cfec9df08a93318822acc.zip
.aliases: Add `map`
Ref. #157.
-rw-r--r--.aliases5
1 files changed, 5 insertions, 0 deletions
diff --git a/.aliases b/.aliases
index 59d6d20..6501714 100644
--- a/.aliases
+++ b/.aliases
@@ -116,6 +116,11 @@ alias plistbuddy="/usr/libexec/PlistBuddy"
# (useful when executing time-consuming commands)
alias badge="tput bel"
+# Intuitive map function
+# For example, to list all directories that contain a certain file:
+# find . -name .gitattributes | map dirname
+alias map="xargs -n1"
+
# One of @janmoesen’s ProTip™s
for method in GET HEAD POST PUT DELETE TRACE OPTIONS; do
alias "$method"="lwp-request -m '$method'"