updating and adding mercurial plugin

This commit is contained in:
Benjamin Martinez 2011-04-11 23:45:23 -07:00
commit 147a761cd2
3 changed files with 55 additions and 20 deletions

View file

@ -40,18 +40,31 @@ else
fi fi
alias pacman='$pcman' alias pacman='$pcman'
alias pacupd='_ $pcman -Syu' ##syncs and updates alias pacupd='_ $pcman -Syu' ##syncs, updates & upgrades
alias pacser='$pcman -Ss' ##search repos for pkgs alias pacsy='_ $pcman -Sy' ## Sync & Update
alias pacins='_ $pcman -S' ##install pkgs alias paclu='$pcman -Qu' ## List upgradeable
alias pacinf='$pcman -Qi' ##info of installed pkgs alias pacser='$pcman -Ss' ##search repos for pkgs
alias paciss='$pcman -Qs' ##search installed pkgs alias pacins='_ $pcman -S' ##install pkgs
alias pacrm='_ $pcman -R' ##uninstalls pkgs alias pacnd='_ $pcman -Sdd' ## Install a package but ignore deps
alias pacrmd='_ $pcman -Rs' ##remove a package and deps which are not required by any other installed package alias pacinf='$pcman -Qi' ##info of installed pkgs
alias pacrma='_ $pcman -Rsn' ##remove a package and deps and .pacsave files alias paciss='$pcman -Qs' ##search installed pkgs
alias pacclc='_ S $pcman -Scc' ## cleans pkgs cache and repos db alias pacrm='_ $pcman -Rd' ##uninstalls pkgs but ignore deps
alias pacrmd='_ $pcman -Rs' ##remove a package and deps which are not required by any other installed package
alias pacrma='_ $pcman -Rsn' ##remove a package and deps and .pacsave files
alias pacclc='_ $pcman -Scc' ## cleans pkgs cache and repos db
alias paclcl='_ $pcman -U' ##Installs / upgrades local pkg
alias pacui='$pcman -Qm' ## List localy built packages
alias pacfi='$pcman -Qo' ## Which package file belongs to
alias paccl='_ $pcman -Scc' ## Fully clean the package cache
alias pacdl='_ $pcman -Sw' ## Download a package without installing
alias paclo='$pcman -Qdt' ## List package orphans
alias paclog='$pcman -Qc' ## Package changelog
##makepkg alias ##makepkg alias
alias mksource='makepkg --source -f' ##creates pkgbuild source tar if existing same ver of source pkg overwritte it alias mksource='makepkg --source -f' ##creates pkgbuild source tar if existing same ver of source pkg overwritte it
alias mkp='makepkg -sf ' ## check for needed deps in main repos install them and build pkg if existing same version of pkg overwrittes it alias mkp='makepkg -sf ' ## check for needed deps in main repos install them and build pkg if existing same version of pkg overwrittes it
alias mkpi='makepkg -sfi' ## same as above but this one also installs it alias mkpi='makepkg -sfi' ## same as above but this one also installs it
alias mkall='makepkg -sf && makepkg --source -f ' ##create pkg and source pkg if existing same version of pkg overwrittes it alias mkall='makepkg -sf && makepkg --source -f ' ##create pkg and source pkg if existing same version of pkg overwrittes it
alias mkalli='makepkg -sfi && makepkg --source -f ' ##same as above but this one also installs it alias mkalli='makepkg -sfi && makepkg --source -f ' ##same as above but this one also installs it

View file

@ -0,0 +1,10 @@
hg_branch_name(){
hg branch | awk '{ print $1 }' || return
}
hg_prompt_info(){
if [[ -d .hg ]]; then
echo "$ZSH_THEME_HG_PROMPT_PREFIX$(hg_branch_name)$ZSH_THEME_HG_PROMPT_SUFFIX"
fi
}

View file

@ -1,11 +1,20 @@
prompt_char() { prompt_char() {
git branch >/dev/null 2>/dev/null && echo "%F{cyan}±%f" || return if [[ -d .git ]]; then
hg root >/dev/null 2>/dev/null && echo "%F{cyan}☿%f" || return echo "%F{cyan}±%f" || return
elif [[ -d .hg ]]; then
echo "%F{cyan}☿%f" || return
elif [[ -d .svn ]]; then
"%F{cyan}☿%f"
fi
} }
custom_prompt_info() { custom_prompt_info() {
git branch >/dev/null 2>/dev/null && echo "$(git_prompt_info)%F{green}<->%f[$(git_prompt_status)]" || return if [[ -d .git ]]; then
hg root >/dev/null 2>/dev/null && hg prompt "{ on {branch}}{ at {bookmark}}{status}" 2> /dev/null || return echo "$(git_prompt_info)%F{green}<->%f[$(git_prompt_status)]" || return
elif [[ -d .hg ]]; then
echo "$(hg_prompt_info)"
fi
} }
command_succes() { command_succes() {
@ -38,10 +47,13 @@ ZSH_THEME_ACBAT_PROMPT_CHARGED="%F{green}°%"
ZSH_THEME_ACBAT_PROMPT_CHARGING="%F{cyan}+%" ZSH_THEME_ACBAT_PROMPT_CHARGING="%F{cyan}+%"
ZSH_THEME_ACBAT_PROMPT_DISCHARGING="%F{yellow}-%" ZSH_THEME_ACBAT_PROMPT_DISCHARGING="%F{yellow}-%"
ZSH_THEME_BATPERC_PROMPT_PREFIX="%F{yellow}⚡%f " ZSH_THEME_BATPERC_PROMPT_PREFIX="%F{yellow}⚡% :"
ZSH_THEME_BATPERC_PROMPT_SUFFIX="" #ZSH_THEME_BATPERC_PROMPT_SUFFIX=""
ZSH_THEME_BATPERC_PROMPT_CLRLESS25PRC="red" ZSH_THEME_BATPERC_PROMPT_CLRLESS25PRC="red"
ZSH_THEME_BATPERC_PROMPT_CLRMORE80PRC="cyan" ZSH_THEME_BATPERC_PROMPT_CLRMORE80PRC="cyan"
ZSH_THEME_BATPERC_PROMPT_CLR40TO80PRC="green" ZSH_THEME_BATPERC_PROMPT_CLR40TO80PRC="green"
ZSH_THEME_BATPERC_PROMPT_CLR25TO40PRC="yellow" ZSH_THEME_BATPERC_PROMPT_CLR25TO40PRC="yellow"
ZSH_THEME_HG_PROMPT_PREFIX="[%F{yellow}"
ZSH_THEME_HG_PROMPT_SUFFIX="%f]"