Skip to content

Commit 3412844

Browse files
committed
minor cleanup
1 parent 3d7f496 commit 3412844

File tree

6 files changed

+10
-26
lines changed

6 files changed

+10
-26
lines changed

.exports

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ export LESS_TERMCAP_so=$(printf '\e[01;33m') # enter standout mode
2424
export LESS_TERMCAP_ue=$(printf '\e[0m') # leave underline mode
2525
export LESS_TERMCAP_us=$(printf '\e[04;36m') # enter underline mode – cyan
2626

27-
# I'll also make sure my `man grep` uses the right one
28-
export MANPATH="$HOME/.homebrew/opt/gnu-sed/libexec/gnubin:$HOME/homebrew/opt/gnu-sed/libexec/gnubin:$MANPATH";
29-
3027

3128
# fzf should be populated via `fd` which is the fastest file/dir finder. (respects gitignore, etc)
3229
# note.. `fd` seems faster than `ag`.. but if i wanted to use `ag` this is good: command ag --files-with-matches --filename-pattern ""

fish/aliases.fish

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,6 @@ alias cleanup_dsstore="find . -name '*.DS_Store' -type f -ls -delete"
138138

139139
alias ungz="gunzip -k"
140140

141-
# File size
142-
alias fs="stat -f \"%z bytes\""
143-
144-
# emptytrash written as a function
145-
146-
# Update installed Ruby gems, Homebrew, npm, and their installed packages
147-
alias brew_update="brew -v update; brew upgrade --force-bottle --cleanup; brew cleanup; brew cask cleanup; brew prune; brew doctor; npm-check -g -u"
148-
alias update_brew_npm_gem='brew_update; npm install npm -g; npm update -g; sudo gem update --system; sudo gem update --no-document'
149-
150141

151142
function gemi
152143
# using https://github.com/simonw/llm-gemini and llm

fish/chromium.fish

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,4 @@ abbr gcert 'gcert-local'
258258
# copy a diff-looking thing (like our karma diffs) to clipboard and this'll run em through delta. Could be improved for multiline strings but.. requires lotta lines.
259259
abbr deltapb 'printf "%s\n" "@@ -1,1 +1,1 @@" (pbpaste) | delta --max-line-length 1024 --minus-style "white #2b0000" --plus-style "white #001900"'
260260

261-
function clstatus --description "pick a branch that is on gerrit as a CL"
262-
set -l branch_name (git cl status --no-branch-color --date-order | awk '/ : / {print $0}' | fzf | awk '{print $1}')
263-
git checkout $branch_name
264-
end
265261

fish/config.fish

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# I've noticed this file gets called multiple times.
1+
# I've noticed this file gets called multiple times. (not on mbp)
22
# todo, investigate later.
33
# status stack-trace
44

@@ -12,10 +12,11 @@
1212
# fish --debug "$(fish --print-debug-categories | grep -v "ast-construction" | sed 's| .*||' | string join ',')"
1313
# ^ outputs 11,400 lines of spawning a fresh shell
1414

15+
1516
function fish_greeting
1617
end
1718

18-
# TODO: path and aliases are kinda slow to source. optimize later.
19+
# TODO: path and aliases are kinda slow to source. optimize later.
1920
function ssource --description "source most of my dotfiles, useful if making changes and iterating"
2021

2122
source ~/.config/fish/path.fish

fish/functions.fish

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,19 +88,17 @@ function all_binaries_in_path --description \
8888
"list all binaries available in \$PATH (incl conflicts). pipe it to grep. top-most are what's used, in case of conflicts"
8989
# based on https://unix.stackexchange.com/a/120790/110766. and then made it faster. needs `brew install findutils`
9090
gfind -L $PATH -maxdepth 1 -executable -type f 2>/dev/null
91+
end
9192

92-
# to list path. topmost wins.
93-
# for val in $PATH; echo "$val"; end
93+
function all_binaries_in_path_grep --description "run all_binaries_in_path and grep with your argument"
94+
all_binaries_in_path | grep $argv
9495
end
9596

96-
function list_path --description "list all paths in PATH"
97+
function list_path --description "list all paths in PATH, top-most wins"
9798
for val in $PATH; echo "$val"; end
9899
end
99100

100-
function my_paths --description "list paths, in order"
101-
echo "# "
102-
printf '%s\n' (string split \n $PATH)
103-
end
101+
104102

105103
function stab --description "stabalize a video"
106104
set -l vid $argv[1]

fish/path.fish

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22

33
# Read from ~/.paths and populate PATH based on that. reversed to ensure priority goes to top of file.
4-
for line in (tac ~/.paths | sed 's|#.*||' | string split -n "\n")
4+
for line in (tac ~/.paths | sed 's|#.*||' | sed 's/^[ \t]*//;s/[ \t]*$//' | string split -n "\n")
55
# skip comments
66
if test (string sub --length 1 "$line") = "#"
77
continue
@@ -12,6 +12,7 @@ for line in (tac ~/.paths | sed 's|#.*||' | string split -n "\n")
1212
# Hmm.. I previously said this existence check excludes some important things but now i'm not sure.
1313
if test -d "$expanded_line" -o -L "$expanded_line"
1414
# --global works like normal PATH additions in bash. but default is --universal which seems like more fun. maybe try that out
15+
# with universal i wouldnt need to do this on every shell startup. I don't know exactly when i do it, then...
1516
fish_add_path --global "$expanded_line"
1617
else
1718
# echo "Warning: Path '$expanded_line' does not exist or is not a directory/symlink. Skipping." >&2

0 commit comments

Comments
 (0)