m instead of cd. + §time.mjs completion

This commit is contained in:
Jan Andrle 2024-03-28 11:36:28 +01:00
parent d8d0c9ba2e
commit 1dc978f1c1
Signed by: jaandrle
GPG Key ID: B3A25AED155AFFAB
2 changed files with 21 additions and 4 deletions

View File

@ -45,12 +45,13 @@ history_most_used(){ LC_ALL=C cat ~/.bash_history | cut -d ';' -f 2- | §awk 1 |
alias §less='less -R -S'
cd.(){
m(){
[[ -z "$1" ]] && return 1
local n="m$1"
[[ -z "${!n}" ]] || return 1
[[ -z "$2" ]] && local p="$(pwd)" || local p="$(readlink -f $2)"
alias cd.$1="cd ${p}";
export $n="$p"
}
alias m='cd.'
alias cd-vifm='cd `vifm --choose-dir -`'
mkcd(){ mkdir -p -- "$1" && cd -P -- "$1"; }

View File

@ -32,6 +32,22 @@
"--help",
"--version"
]
},
"§time.mjs": {
"npx": false,
"completions": {
"diff": [
"--unit"
],
"?": "diff",
"zone": [
"--z"
]
},
"completions_all": [
"--help",
"--version"
]
}
}
}
}