mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-12 15:34:50 +08:00
Compare commits
3 Commits
8c7c1ed8cb
...
cda1a8e33c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cda1a8e33c | ||
|
|
92aed2e936 | ||
|
|
92a9fee013 |
@ -77,7 +77,15 @@ EOF
|
||||
(*.lzma) unlzma "$full_path" ;;
|
||||
(*.z) uncompress "$full_path" ;;
|
||||
(*.zip|*.war|*.jar|*.ear|*.sublime-package|*.ipa|*.ipsw|*.xpi|*.apk|*.aar|*.whl|*.vsix|*.crx|*.pk3|*.pk4) unzip "$full_path" ;;
|
||||
(*.rar) unrar x -ad "$full_path" ;;
|
||||
(*.rar)
|
||||
if (( $+commands[unrar] )); then
|
||||
unrar x -ad "$full_path"
|
||||
elif (( $+commands[unar] )); then
|
||||
unar -o . "$full_path"
|
||||
else
|
||||
echo "extract: cannot extract RAR files: install unrar or unar" >&2
|
||||
success=1
|
||||
fi ;;
|
||||
(*.rpm)
|
||||
rpm2cpio "$full_path" | cpio --quiet -id ;;
|
||||
(*.7z | *.7z.[0-9]* | *.pk7) 7za x "$full_path" ;;
|
||||
|
||||
@ -268,6 +268,7 @@ receive further support.
|
||||
| `grename <old> <new>` | Renames branch `<old>` to `<new>`, including on the origin remote. |
|
||||
| `gbda` | Deletes all merged branches |
|
||||
| `gbds` | Deletes all squash-merged branches (**Note: performance degrades with number of branches**) |
|
||||
| `glb` | List latest switched to branches (default 10, can use glb X to get latest X branches)
|
||||
|
||||
### Work in Progress (WIP)
|
||||
|
||||
|
||||
@ -71,6 +71,12 @@ function grename() {
|
||||
fi
|
||||
}
|
||||
|
||||
# List latest X (default 10) used branches
|
||||
glb() {
|
||||
local count=${1:-10}
|
||||
git reflog | grep 'checkout: moving' | awk '{print $8}' | awk '!seen[$0]++' | head -n "$count"
|
||||
}
|
||||
|
||||
#
|
||||
# Functions Work in Progress (WIP)
|
||||
# (sorted alphabetically by function name)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user