From dd135ee1526d271ae022810ed6cc2a71938da04b Mon Sep 17 00:00:00 2001 From: typebrook Date: Mon, 30 Dec 2019 11:06:28 +0800 Subject: update --- alias | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'alias') diff --git a/alias b/alias index 5a481c3..e35d392 100644 --- a/alias +++ b/alias @@ -24,9 +24,7 @@ vs() { # shell alias src="source $HOME/.$(basename $SHELL)rc" alias ll='ls -alh' -alias si='sudo snap install' # snap install -alias ni='sudo npm install -g' # nodejs install -alias hg='history|grep' +alias hg='history | grep' alias rmrf='rm -rf' alias rr='move_to_tmp' move_to_tmp() { @@ -42,6 +40,8 @@ prompt() { # package alias ai='sudo apt install' # apt install alias aptu='sudo apt update && sudo apt upgrade' +alias si='sudo snap install' # snap install +alias ni='sudo npm install -g' # nodejs install # cd to DIRs alias ..='cd ..' @@ -76,9 +76,9 @@ wi() { alias ce='crontab -e' # ranger -alias r='_ranger-cd' +alias r='_ranger_cd' alias ranrc='vim ~/.config/ranger/rc.conf' -_ranger-cd() { +_ranger_cd() { tempfile="$(mktemp -t tmp.XXXXXX)" ranger --choosedir="$tempfile" "${@:-$(pwd)}" test -f "$tempfile" && @@ -104,7 +104,7 @@ gcg() { } alias gls='git log -S' alias cdgs='cd $(git submodule status | sed "s/^.//" | cut -d" " -f2)' # cd to first submodule -gh-release-asset() { +gh_release_asset() { command="upload-github-release-asset.sh\n github_api_token=$(cat ~/settings/tokens/github)\n owner=typebrook\n repo=tig\n tag=LATEST\n filename=$(which tig)\n overwrite=false" prompt "$command" } @@ -131,7 +131,7 @@ alias t='tig' alias ts='tig status' alias ta='tig --all' alias get-tig='curl -LO https://github.com/typebrook/tig/releases/download/tig-2.5.0/tig' -upload-tig() { +upload_tig() { upload-github-release-asset.sh \ github_api_token=$(cat ~/settings/tokens/github) \ owner=typebrook \ @@ -147,7 +147,7 @@ alias adb-default='adb shell dumpsys package domain-preferred-apps' alias adb-list='adb shell dumpsys package d' alias rmcache='rm -rf ~/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/*' alias adb-last-screenshot='adb pull /sdcard/Screenshots/`adb shell ls -t /sdcard/Screenshots/ | head -1` ~/Desktop' -adb-push() { +adb_push() { adb push $1 /sdcard/Download } @@ -200,10 +200,7 @@ alias data-osm-diff="curl https://planet.openstreetmap.org/replication/minute/st alias data-taiwan-town='curl -o town.zip -L http://data.moi.gov.tw/MoiOD/System/DownloadFile.aspx\?DATA\=CD02C824-45C5-48C8-B631-98B205A2E35A' alias data-taiwan-village='curl -o village.zip -L http://data.moi.gov.tw/MoiOD/System/DownloadFile.aspx\?DATA\=B8AF344F-B5C6-4642-AF46-1832054399CE' alias data-taiwan-poly='curl -O http://download.geofabrik.de/asia/taiwan.poly' -data-taiwan-county-code() { - curl --silent https://www.ris.gov.tw/documents/data/5/1/RSCD0101.txt |\ - iconv -f BIG-5 -t UTF-8 - -} +alias data-taiwan-county-code='curl --silent https://www.ris.gov.tw/documents/data/5/1/RSCD0101.txt | iconv -f BIG-5 -t UTF-8 -' # clipboard alias xi='xsel -ib' -- cgit v1.2.3-70-g09d2