aboutsummaryrefslogtreecommitdiff
path: root/fish/.config
diff options
context:
space:
mode:
Diffstat (limited to 'fish/.config')
-rw-r--r--fish/.config/fish/conf.d/rustup.fish2
-rw-r--r--fish/.config/fish/config.fish28
-rw-r--r--fish/.config/fish/functions/ask.fish4
-rw-r--r--fish/.config/fish/functions/load_env.fish45
-rw-r--r--fish/.config/fish/functions/pysource.fish3
-rw-r--r--fish/.config/fish/functions/tcl.fish3
-rw-r--r--fish/.config/fish/functions/tclear.fish3
7 files changed, 28 insertions, 60 deletions
diff --git a/fish/.config/fish/conf.d/rustup.fish b/fish/.config/fish/conf.d/rustup.fish
index e4cb363..fdedb96 100644
--- a/fish/.config/fish/conf.d/rustup.fish
+++ b/fish/.config/fish/conf.d/rustup.fish
@@ -1 +1 @@
-source "$HOME/.cargo/env.fish"
+# source "$HOME/.cargo/env.fish"
diff --git a/fish/.config/fish/config.fish b/fish/.config/fish/config.fish
index 196ae85..f2535da 100644
--- a/fish/.config/fish/config.fish
+++ b/fish/.config/fish/config.fish
@@ -1,30 +1,30 @@
set host (hostname)
-if string match -q "*turing*" "$host"
- set -x PATH /Users/scie/.local/nvim-macos-arm64/bin \
- /opt/homebrew/Cellar/universal-ctags/HEAD-43ca055/bin \
- /Users/scie/.local/xonsh-env/xbin \
- /Users/scie/.local/xonsh-env/xbin \
+if string match -q Darwin (uname)
+ set -x PATH ~/.local/nvim-macos-arm64/bin \
+ /opt/homebrew/opt/uutils-coreutils/libexec/uubin \
+ ~/.local/xonsh-env/xbin \
+ ~/.local/xonsh-env/xbin \
/opt/homebrew/opt/icu4c@76/sbin \
/opt/homebrew/opt/icu4c@76/bin \
/opt/homebrew/opt/llvm/bin \
- /Users/scie/.dotnet/tools \
- /Users/scie/.local/bin \
- /Users/scie/Library/Python/3.9/bin \
- /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/emulators \
+ ~/.dotnet/tools \
+ ~/.local/bin \
+ ~/Library/Python/3.9/bin \
/opt/homebrew/bin/iodine \
/opt/homebrew/bin \
/opt/homebrew/opt/zig@0.14/bin \
- /Users/scie/.platformio/penv/bin/ \
- /Users/scie/.cargo/bin \
- /Users/scie/.local/xonsh-env/xbin \
- /Users/scie/go/bin \
+ ~/.platformio/penv/bin/ \
+ ~/.cargo/bin \
+ ~/.local/xonsh-env/xbin \
+ ~/go/bin \
/usr/bin \
/usr/local/bin \
/usr/sbin \
/usr/local/sbin \
/bin \
- /sbin
+ /sbin \
+ $PATH
else if test "$host" = lovelace
set -x PATH /home/scie/.local/bin \
/home/linuxbrew/.linuxbrew/bin \
diff --git a/fish/.config/fish/functions/ask.fish b/fish/.config/fish/functions/ask.fish
new file mode 100644
index 0000000..3282d27
--- /dev/null
+++ b/fish/.config/fish/functions/ask.fish
@@ -0,0 +1,4 @@
+function ask --description "Ask for input and respond with input"
+ read -s -P "Enter Input: " response
+ echo $response
+end
diff --git a/fish/.config/fish/functions/load_env.fish b/fish/.config/fish/functions/load_env.fish
deleted file mode 100644
index 7b84aaa..0000000
--- a/fish/.config/fish/functions/load_env.fish
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copilot Generated
-function load_env --description 'Load environment variables from a .env file (defaults to ./.env)'
- set -l env_file ".env"
- if test (count $argv) -gt 0
- set env_file $argv[1]
- end
-
- if not test -f "$env_file"
- echo "Error: Environment file not found: $env_file" >&2
- return 1
- end
-
- for line in (cat -- "$env_file")
- set -l trimmed (string trim -- "$line")
- # Skip empty lines and comments
- if test -z "$trimmed"; or string match -q -r "^\s*#" -- "$trimmed"
- continue
- end
-
- # Only process lines with =
- if not string match -q -- '*=*' "$trimmed"
- continue
- end
-
- # Use regex to extract key and value, and preserve quotes in value
- set -l key (string match -r '^[^=]+' "$trimmed")
- set -l rest (string match -r '=[\s\S]*$' "$trimmed")
-
- if test -z "$key" -o -z "$rest"
- continue
- end
-
- set -l key (string trim -- "$key")
- set -l value (string trim -- (string sub -s 2 -- "$rest")) # Remove leading '='
-
- # Validate variable name
- if not string match -q -r '^[a-zA-Z_][a-zA-Z0-9_]*$' "$key"
- echo "Warning: Invalid variable name '$key'. Skipping."
- continue
- end
-
- # Reconstruct assignment and use eval to preserve value as-is
- eval "set -gx $key $value"
- end
-end
diff --git a/fish/.config/fish/functions/pysource.fish b/fish/.config/fish/functions/pysource.fish
new file mode 100644
index 0000000..818f053
--- /dev/null
+++ b/fish/.config/fish/functions/pysource.fish
@@ -0,0 +1,3 @@
+function pysource --wraps='source .venv/bin/activate.fish' --description 'alias pysource=source .venv/bin/activate.fish'
+ source .venv/bin/activate.fish $argv
+end
diff --git a/fish/.config/fish/functions/tcl.fish b/fish/.config/fish/functions/tcl.fish
new file mode 100644
index 0000000..bbf5e41
--- /dev/null
+++ b/fish/.config/fish/functions/tcl.fish
@@ -0,0 +1,3 @@
+function tcl --wraps='clear && clear' --description 'alias tcl=clear && clear'
+ clear && clear $argv
+end
diff --git a/fish/.config/fish/functions/tclear.fish b/fish/.config/fish/functions/tclear.fish
new file mode 100644
index 0000000..da31259
--- /dev/null
+++ b/fish/.config/fish/functions/tclear.fish
@@ -0,0 +1,3 @@
+function tclear --wraps='clear && clear' --description 'alias tclear=clear && clear'
+ clear && clear $argv
+end