mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
updating and adding mercurial plugin
This commit is contained in:
parent
392a19f781
commit
147a761cd2
3 changed files with 55 additions and 20 deletions
|
|
@ -40,18 +40,31 @@ else
|
|||
fi
|
||||
|
||||
alias pacman='$pcman'
|
||||
alias pacupd='_ $pcman -Syu' ##syncs and updates
|
||||
alias pacser='$pcman -Ss' ##search repos for pkgs
|
||||
alias pacins='_ $pcman -S' ##install pkgs
|
||||
alias pacinf='$pcman -Qi' ##info of installed pkgs
|
||||
alias paciss='$pcman -Qs' ##search installed pkgs
|
||||
alias pacrm='_ $pcman -R' ##uninstalls pkgs
|
||||
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='_ S $pcman -Scc' ## cleans pkgs cache and repos db
|
||||
alias pacupd='_ $pcman -Syu' ##syncs, updates & upgrades
|
||||
alias pacsy='_ $pcman -Sy' ## Sync & Update
|
||||
alias paclu='$pcman -Qu' ## List upgradeable
|
||||
alias pacser='$pcman -Ss' ##search repos for pkgs
|
||||
alias pacins='_ $pcman -S' ##install pkgs
|
||||
alias pacnd='_ $pcman -Sdd' ## Install a package but ignore deps
|
||||
alias pacinf='$pcman -Qi' ##info of installed pkgs
|
||||
alias paciss='$pcman -Qs' ##search installed pkgs
|
||||
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
|
||||
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 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 mkalli='makepkg -sfi && makepkg --source -f ' ##same as above but this one also installs 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 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 mkalli='makepkg -sfi && makepkg --source -f ' ##same as above but this one also installs it
|
||||
|
||||
|
|
|
|||
10
plugins/mercurial/mercurial.plugin.zsh
Normal file
10
plugins/mercurial/mercurial.plugin.zsh
Normal 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
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1,11 +1,20 @@
|
|||
|
||||
prompt_char() {
|
||||
git branch >/dev/null 2>/dev/null && echo "%F{cyan}±%f" || return
|
||||
hg root >/dev/null 2>/dev/null && echo "%F{cyan}☿%f" || return
|
||||
if [[ -d .git ]]; then
|
||||
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() {
|
||||
git branch >/dev/null 2>/dev/null && echo "$(git_prompt_info)%F{green}<->%f[$(git_prompt_status)]" || return
|
||||
hg root >/dev/null 2>/dev/null && hg prompt "{ on {branch}}{ at {bookmark}}{status}" 2> /dev/null || return
|
||||
if [[ -d .git ]]; then
|
||||
echo "$(git_prompt_info)%F{green}<->%f[$(git_prompt_status)]" || return
|
||||
elif [[ -d .hg ]]; then
|
||||
echo "$(hg_prompt_info)"
|
||||
fi
|
||||
|
||||
}
|
||||
command_succes() {
|
||||
|
|
@ -38,10 +47,13 @@ ZSH_THEME_ACBAT_PROMPT_CHARGED="%F{green}°%"
|
|||
ZSH_THEME_ACBAT_PROMPT_CHARGING="%F{cyan}+%"
|
||||
ZSH_THEME_ACBAT_PROMPT_DISCHARGING="%F{yellow}-%"
|
||||
|
||||
ZSH_THEME_BATPERC_PROMPT_PREFIX="%F{yellow}⚡%f "
|
||||
ZSH_THEME_BATPERC_PROMPT_SUFFIX=""
|
||||
ZSH_THEME_BATPERC_PROMPT_PREFIX="%F{yellow}⚡% :"
|
||||
#ZSH_THEME_BATPERC_PROMPT_SUFFIX=""
|
||||
ZSH_THEME_BATPERC_PROMPT_CLRLESS25PRC="red"
|
||||
ZSH_THEME_BATPERC_PROMPT_CLRMORE80PRC="cyan"
|
||||
ZSH_THEME_BATPERC_PROMPT_CLR40TO80PRC="green"
|
||||
ZSH_THEME_BATPERC_PROMPT_CLR25TO40PRC="yellow"
|
||||
|
||||
ZSH_THEME_HG_PROMPT_PREFIX="[%F{yellow}"
|
||||
ZSH_THEME_HG_PROMPT_SUFFIX="%f]"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue