mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-10 02:52:55 +00:00
change proj functions for new dir structure
This commit is contained in:
parent
a33dbdb276
commit
d50482639c
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user