change proj functions for new dir structure

This commit is contained in:
Noah Masur 2020-12-12 18:36:02 -07:00
parent a33dbdb276
commit d50482639c
2 changed files with 3 additions and 7 deletions

View File

@ -5,9 +5,8 @@ if status --is-interactive
# Set $PATH for finding programs # Set $PATH for finding programs
set FISH_DIR (readlink ~/.config/fish) set FISH_DIR (readlink ~/.config/fish)
set DOTS (dirname $FISH_DIR) set DOTS (dirname $FISH_DIR)
set PROJ (dirname $DOTS)
set PATH $PATH /usr/local/bin ~/.local/bin $DOTS/bin ~/.cargo/bin set PATH $PATH /usr/local/bin ~/.local/bin $DOTS/bin ~/.cargo/bin
set CDPATH . $HOME $PROJ set CDPATH . $HOME
set EDITOR nvim set EDITOR nvim
# Use `vi` in the shell with cursor shapes # Use `vi` in the shell with cursor shapes

View File

@ -2,15 +2,12 @@
function projects --description "Projects tools" function projects --description "Projects tools"
set PROJ $HOME/dev/work
alias proj='cd $PROJ' alias proj='cd $PROJ'
function prj --description "cd to a project" function prj --description "cd to a project"
set projdir (ls $PROJ | fzf) set projdir (ls $PROJ | fzf)
if [ $status -eq 0 ] and cd $PROJ/$projdir
cd $projdir
else
return 1
end
end end
end end