diff options
-rw-r--r-- | alias | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -25,7 +25,17 @@ alias ld='cd -' # last directory | |||
25 | alias cdd='cd ~/Downloads' | 25 | alias cdd='cd ~/Downloads' |
26 | alias cdg='cd ~/git' | 26 | alias cdg='cd ~/git' |
27 | alias cds='cd ~/git/settings' | 27 | alias cds='cd ~/git/settings' |
28 | alias r='ranger' | 28 | |
29 | alias r='ranger-cd' | ||
30 | function ranger-cd { | ||
31 | tempfile="$(mktemp -t tmp.XXXXXX)" | ||
32 | ranger --choosedir="$tempfile" "${@:-$(pwd)}" | ||
33 | test -f "$tempfile" && | ||
34 | if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then | ||
35 | cd -- "$(cat "$tempfile")" | ||
36 | fi | ||
37 | rm -f -- "$tempfile" | ||
38 | } | ||
29 | 39 | ||
30 | # disk | 40 | # disk |
31 | alias df='df -h' | 41 | alias df='df -h' |
@@ -73,9 +83,9 @@ alias ty='tig stash' | |||
73 | alias rl='git reflog --pretty=raw | tig --pretty=raw' | 83 | alias rl='git reflog --pretty=raw | tig --pretty=raw' |
74 | 84 | ||
75 | # Android | 85 | # Android |
76 | alias debug='./gradlew app:installDebug && adb shell am start -n adb shell am start -n com.geothings.geobingan/.MainActivity_' | 86 | alias debug='./gradlew app:installDebug && adb shell am start -n com.geothings.geobingan/.MainActivity_' |
77 | alias adbdefault='adb shell dumpsys package domain-preferred-apps' | 87 | alias adb-default='adb shell dumpsys package domain-preferred-apps' |
78 | alias adblist='adb shell dumpsys package d' | 88 | alias adb-list='adb shell dumpsys package d' |
79 | alias rmcache='rm -rf ~/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/*' | 89 | alias rmcache='rm -rf ~/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/*' |
80 | alias adb-last-screenshot='adb pull /sdcard/Screenshots/`adb shell ls -t /sdcard/Screenshots/ | head -1` ~/Desktop' | 90 | alias adb-last-screenshot='adb pull /sdcard/Screenshots/`adb shell ls -t /sdcard/Screenshots/ | head -1` ~/Desktop' |
81 | 91 | ||