Three patches in one for this silly commit title
Activate search history and liquidprompt only if in interactive prompt Add a color python wrapper. Use the last commit date in the git_archive function, instead of the current one.
This commit is contained in:
parent
21adc08407
commit
351699cda9
1 changed files with 21 additions and 9 deletions
18
.bashrc
18
.bashrc
|
|
@ -119,9 +119,12 @@ function md() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# if in an interactive shell
|
||||||
|
if [[ $- == *i* ]]; then
|
||||||
# use up/down to search history, matching the current line start
|
# use up/down to search history, matching the current line start
|
||||||
bind '"\e[A": history-search-backward'
|
bind '"\e[A": history-search-backward'
|
||||||
bind '"\e[B": history-search-forward'
|
bind '"\e[B": history-search-forward'
|
||||||
|
fi
|
||||||
|
|
||||||
#############
|
#############
|
||||||
# Processes #
|
# Processes #
|
||||||
|
|
@ -179,8 +182,14 @@ function cm()
|
||||||
{
|
{
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
$@ 2>&1 | colout -t cmake | colout -t g++
|
$@ 2>&1 | colout -t cmake | colout -t g++
|
||||||
|
#| less
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function cpy()
|
||||||
|
{
|
||||||
|
set -o pipefail
|
||||||
|
$@ 2>&1 | colout -t python
|
||||||
|
}
|
||||||
|
|
||||||
# shortcut to display the url config of remote repo in a git root
|
# shortcut to display the url config of remote repo in a git root
|
||||||
alias git_remotes="grep -A 2 \"\[remote\" .git/config|grep -v fetch|sed \"s/\[remote \\\"//\"|sed ':a;N;\$!ba;s/\"\]\n\s*url = /\t/g'"
|
alias git_remotes="grep -A 2 \"\[remote\" .git/config|grep -v fetch|sed \"s/\[remote \\\"//\"|sed ':a;N;\$!ba;s/\"\]\n\s*url = /\t/g'"
|
||||||
|
|
@ -201,9 +210,9 @@ function git_ignore()
|
||||||
# The archive file name has the current date in its name.
|
# The archive file name has the current date in its name.
|
||||||
function git_archive()
|
function git_archive()
|
||||||
{
|
{
|
||||||
today=`date --iso-8601`
|
last_commit_date=$(git log -1 --format=%ci | awk '{print $1"_"$2;}')
|
||||||
project=$(basename $(pwd))
|
project=$(basename $(pwd))
|
||||||
name=${project}_${today}
|
name=${project}_${last_commit_date}
|
||||||
git archive --prefix=$name/ --format zip master > $name.zip
|
git archive --prefix=$name/ --format zip master > $name.zip
|
||||||
echo $name.zip
|
echo $name.zip
|
||||||
}
|
}
|
||||||
|
|
@ -253,11 +262,14 @@ HISTTIMEFORMAT='%F %T '
|
||||||
# Manually switch to the bépo keyboard layout
|
# Manually switch to the bépo keyboard layout
|
||||||
alias bepo="setxkbmap -layout fr -variant bepo -option"
|
alias bepo="setxkbmap -layout fr -variant bepo -option"
|
||||||
|
|
||||||
|
if [[ $- == *i* ]]; then
|
||||||
# Super nice prompt
|
# Super nice prompt
|
||||||
source ~/.liquidpromptrc
|
source ~/.liquidpromptrc
|
||||||
source ~/.liquidprompt
|
source ~/.liquidprompt
|
||||||
|
fi
|
||||||
|
|
||||||
# Added by autojump install.sh
|
# Added by autojump install.sh
|
||||||
#source /etc/profile.d/autojump.bash
|
#source /etc/profile.d/autojump.bash
|
||||||
|
|
||||||
export TCLLIBPATH=~/.local/share/tkthemes
|
export TCLLIBPATH="~/.local/share/tkthemes"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue