mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-07-03 05:31:17 +02:00
feat(git): add gcb helper to copy current branch name
Signed-off-by: NunzioFornitto <FRNNNZ00C24B202G@studium.unict.it>
This commit is contained in:
parent
ff2f16e8df
commit
726cedd375
1 changed files with 7 additions and 0 deletions
|
|
@ -68,6 +68,13 @@ function grename() {
|
|||
# (sorted alphabetically by function name)
|
||||
# (order should follow README)
|
||||
#
|
||||
function gcb() {
|
||||
# Controlla se siamo in un repository Git
|
||||
command git rev-parse --is-inside-work-tree &>/dev/null || return
|
||||
|
||||
# Prende il branch corrente, rimuove il newline e lo copia negli appunti
|
||||
command git branch --show-current | tr -d '\n' | clipcopy
|
||||
}
|
||||
|
||||
# Similar to `gunwip` but recursive "Unwips" all recent `--wip--` commits not just the last one
|
||||
function gunwipall() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue