Skip to content

Commit

Permalink
dir impl replaced with dirp 0.1
Browse files Browse the repository at this point in the history
The easiest way to install dirp
right now is with go:

```sh
go get -u github.com/avindra/dirp
```
  • Loading branch information
avindra committed Jan 19, 2021
1 parent a2e652a commit b74309d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 100 deletions.
21 changes: 1 addition & 20 deletions .aliases
Original file line number Diff line number Diff line change
Expand Up @@ -66,26 +66,7 @@ alias crypto="curl -H 'User-Agent: wget' rate.sx"

alias v="vi"

# Remove DOS-like dir alias for "ls" if it exists
# the definition for `dir` follows
#
alias dir &> /dev/null
if [[ $? -eq 0 ]]; then
unalias dir
fi

# Dir switcher (favorites)
#
function dir() {
prog="$HOME/bin/lib/dir"
dir=`$prog`
if [[ -n $dir ]]; then
echo "Switching to $dir... "
pushd "$dir"
fi
}

export -f dir
eval "$(dirp hook bash)"

# Syntax highlight the file, with the
# familiarity of "cat"
Expand Down
32 changes: 4 additions & 28 deletions .config/fish/config.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
set fish_greeting "The Quieter you Become, the More you are able to Hear."


# direnv hook https://github.com/direnv/direnv/blob/master/docs/hook.md#fish
eval (direnv hook fish)

Expand Down Expand Up @@ -55,7 +54,7 @@ abbr -a -g no node
abbr -a -g de deno
abbr -a -g y yarn install --ignore-engines --ignore-scripts
abbr -a -g npm npm run
abbr -a -g npmi npm install --no-fund --no-audit --ignore-scripts
abbr -a -g npmi npm install --no-fund --no-audit --ignore-engines --ignore-scripts
abbr -a -g clj planck
# rust
abbr -a -g car cargo run --release -j(nproc)
Expand Down Expand Up @@ -134,32 +133,6 @@ function diff
git diff $argv
end

# Todo: add ability to bookmark current dir to config
function dir
set prog "$HOME/bin/lib/dir"

if [ "$argv[1]" = "cfg" ]
$EDITOR "$HOME/.config/dir/list"
return $status
else if test -d "$argv[1]"
# driller feature
set selection (find "$argv[1]" -maxdepth 1 -type d | $prog)
else
# default
set selection ($prog)
end

if [ "x$selection" = "x" ]
echo -n "How are we doing @ "
uptime
return $status
end

echo "Switching to $selection"
pushd "$selection"
end


set os (uname -s)

# use nvim where vim doesn't run well
Expand Down Expand Up @@ -253,5 +226,8 @@ starship init fish | source
# hook deno compl
deno completions fish | source

# hook dirp compl
dirp hook | source

# general shell exports
~/.exports | source
50 changes: 0 additions & 50 deletions bin/lib/dir

This file was deleted.

2 changes: 1 addition & 1 deletion bin/tw-check-snap
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ else
set ahead (nDays $a)
set behind (nDays $b)

echo "$latest is available ($ahead ahead)"
echo "$latest is available (since $ahead)"
echo "$today is today's date"
echo "$current is your patchset ($behind behind)"
end
2 changes: 1 addition & 1 deletion bin/vendor-rust
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ for p in $patches; do
patch -p1 < $rpmdir/$p
done

cargo vendor
CARGO_NET_GIT_FETCH_WITH_CLI=true cargo vendor

time tar -cf - vendor/ | xz -9 -c - > "$target"

Expand Down

0 comments on commit b74309d

Please sign in to comment.