diff --git a/plugins/archlinux/archlinux.plugin.zsh b/plugins/archlinux/archlinux.plugin.zsh index 3b40855f2..126e34e41 100644 --- a/plugins/archlinux/archlinux.plugin.zsh +++ b/plugins/archlinux/archlinux.plugin.zsh @@ -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 + diff --git a/plugins/mercurial/mercurial.plugin.zsh b/plugins/mercurial/mercurial.plugin.zsh new file mode 100644 index 000000000..aef1bb484 --- /dev/null +++ b/plugins/mercurial/mercurial.plugin.zsh @@ -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 +} + + diff --git a/themes/cruznick.zsh-theme b/themes/cruznick.zsh-theme index 7c6f8b6e9..c1b21a70c 100644 --- a/themes/cruznick.zsh-theme +++ b/themes/cruznick.zsh-theme @@ -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]" +