summaryrefslogtreecommitdiff
path: root/config/.bashrc
diff options
context:
space:
mode:
Diffstat (limited to 'config/.bashrc')
-rw-r--r--config/.bashrc13
1 files changed, 9 insertions, 4 deletions
diff --git a/config/.bashrc b/config/.bashrc
index e85ae56..e883436 100644
--- a/config/.bashrc
+++ b/config/.bashrc
@@ -3,8 +3,8 @@
alias nuget='mono /usr/local/bin/nuget.exe'
function inflate() {
- file=$1
- to_dir=$2
+ local file=$1
+ local to_dir=$2
if [ -f "$file" ]; then
echo "Inflating $file in $to_dir"
tar --use-compress-program zstd -xf "$file" -C "$to_dir"
@@ -13,12 +13,17 @@ function inflate() {
}
function switch_to() {
- tool=$1
- major_version=$2
+ local tool=$1
+ local major_version=$2
+ local version
version="$(grep "$tool" "$HOME/.tool-versions"| tr ' ' '\n' | grep "^$major_version")"
asdf shell "$tool" "$version"
}
+function major_version_from() {
+ echo "$1" | cut -d'.' -f1
+}
+
function enable_dev_mode() {
unset HISTFILESIZE
unset HISTSIZE