projects
/
scripts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d603ace
)
Miscellaneous updates.
author
Francois Fleuret
<francois@fleuret.org>
Fri, 22 Jul 2011 09:37:12 +0000
(11:37 +0200)
committer
Francois Fleuret
<francois@fleuret.org>
Fri, 22 Jul 2011 09:37:12 +0000
(11:37 +0200)
bashrc
patch
|
blob
|
history
diff --git
a/bashrc
b/bashrc
index
2d0f111
..
3b4910c
100644
(file)
--- a/
bashrc
+++ b/
bashrc
@@
-107,6
+107,8
@@
alias ps='ps uxaf'
alias df='df -hT --sync'
alias grep='grep -E --mmap --color=auto'
alias find='ionice -c3 find'
alias df='df -hT --sync'
alias grep='grep -E --mmap --color=auto'
alias find='ionice -c3 find'
+alias pd=pushd
+alias val='valgrind --leak-check=full --show-reachable=yes --db-attach=yes '
alias s='screen -d -R -U && clear'
alias s='screen -d -R -U && clear'
@@
-342,7
+344,12
@@
function netup () {
echo ${ARGS} > ${NETUP_HISTORY}
fi
echo ${ARGS} > ${NETUP_HISTORY}
fi
- echo "${VT_GREEN_FG}Running [sudo ifup ${ARGS}]${VT_RESET}"
+ if [[ $(ps auxwww | grep dhclient | grep -v grep) ]]; then
+ echo "There is already a dhcp client running." >&2
+ return 1
+ fi
+
+ echo "${VT_GREEN_FG}Executing [sudo ifup ${ARGS}]${VT_RESET}"
sudo ifup ${ARGS}
# Ugly hack to remove the dsl modem dns server when we add
sudo ifup ${ARGS}
# Ugly hack to remove the dsl modem dns server when we add
@@
-351,7
+358,7
@@
function netup () {
REMOVE_LOCAL_DNS=/usr/local/bin/remove-local-dns.sh
if [[ -x ${REMOVE_LOCAL_DNS} ]]; then
REMOVE_LOCAL_DNS=/usr/local/bin/remove-local-dns.sh
if [[ -x ${REMOVE_LOCAL_DNS} ]]; then
- echo "${VT_GREEN_FG}
Runn
ing [sudo ${REMOVE_LOCAL_DNS} 192.168]${VT_RESET}"
+ echo "${VT_GREEN_FG}
Execut
ing [sudo ${REMOVE_LOCAL_DNS} 192.168]${VT_RESET}"
sudo ${REMOVE_LOCAL_DNS} 192.168
fi
}
sudo ${REMOVE_LOCAL_DNS} 192.168
fi
}
@@
-365,7
+372,7
@@
function netdown () {
# Otherwise, use the standard ifdown
ARGS="$@"
fi
# Otherwise, use the standard ifdown
ARGS="$@"
fi
- echo "${VT_GREEN_FG}
Runn
ing sudo [ifdown ${ARGS}]${VT_RESET}"
+ echo "${VT_GREEN_FG}
Execut
ing sudo [ifdown ${ARGS}]${VT_RESET}"
sudo ifdown ${ARGS}
}
sudo ifdown ${ARGS}
}
@@
-850,7
+857,7
@@
export SELECTOR_CD_HISTORY
function selector-cd-search () {
PATH_TEMP=$(mktemp /tmp/selector-cd-path.XXXXXX)
function selector-cd-search () {
PATH_TEMP=$(mktemp /tmp/selector-cd-path.XXXXXX)
- selector -t "cd" -l 10000 -d -i -o ${PATH_TEMP} -q ${SELECTOR_CD_HISTORY}
+ selector -t "cd" -l 10000 -d -i -
c 7,4,0,5 -
o ${PATH_TEMP} -q ${SELECTOR_CD_HISTORY}
cd "$(cat ${PATH_TEMP} | sed -e 's!~!'${HOME}'!')"
\rm ${PATH_TEMP}
}
cd "$(cat ${PATH_TEMP} | sed -e 's!~!'${HOME}'!')"
\rm ${PATH_TEMP}
}
@@
-893,6
+900,8
@@
function prompt_command () {
# save the history after every command to avoid loosing some when
# multiple shells are open
history -a
# save the history after every command to avoid loosing some when
# multiple shells are open
history -a
+# load the saved history
+ history -n
# and the local histories system defined above
keep_local_history
# and the history cue
# and the local histories system defined above
keep_local_history
# and the history cue