mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-21 19:55:38 +00:00
fcd and clean up fish
This commit is contained in:
parent
281f2a5a86
commit
895b779eab
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,6 +4,7 @@ nvim.configlink/.netrwhist
|
||||
nvim.configlink/plugged/**
|
||||
nvim.configlink/autoload/**
|
||||
fish.configlink/config.fish.bac
|
||||
fish.configlink/functions/vim.fish
|
||||
fish_variables
|
||||
homebrew/*.lock.json
|
||||
*.bak
|
||||
|
@ -1,6 +1,7 @@
|
||||
!.env*
|
||||
!.github/
|
||||
!.gitignore
|
||||
!*.tfvars
|
||||
.terraform/
|
||||
.target/
|
||||
/Library/
|
||||
|
@ -8,11 +8,9 @@ function abbrs --description 'All abbreviations'
|
||||
abbr -a ll 'ls -alhF'
|
||||
abbr -a lf 'ls -lh | fzf'
|
||||
abbr -a c 'cd'
|
||||
abbr -a fcd 'cd (fd -t d . ~ | fzf)'
|
||||
abbr -a -- - 'cd -'
|
||||
abbr -a proj 'cd $PROJ'
|
||||
abbr -a mkd 'mkdir -pv'
|
||||
alias --save fcd 'set jump (fd -t d . ~ | fzf); and cd $jump'
|
||||
|
||||
# Tmux
|
||||
abbr -a ta 'tmux attach-session'
|
||||
@ -54,6 +52,7 @@ function abbrs --description 'All abbreviations'
|
||||
alias --save vim='nvim'
|
||||
abbr -a vimrc 'vim $HOME/.config/nvim/init.vim'
|
||||
else
|
||||
alias --save vim='vim'
|
||||
abbr -a vimrc 'vim $HOME/.vimrc'
|
||||
end
|
||||
abbr -a v 'vim'
|
||||
|
@ -1,4 +1,11 @@
|
||||
# Defined via `source`
|
||||
function fcd --wraps='set jump (fd -t d . ~ | fzf); and cd $jump' --description 'alias fcd set jump (fd -t d . ~ | fzf); and cd $jump'
|
||||
set jump (fd -t d . ~ | fzf); and cd $jump $argv;
|
||||
function fcd --description 'Jump to directory' -a 'directory'
|
||||
if test -z $directory
|
||||
set directory "$HOME"
|
||||
end
|
||||
if ! test -d $directory
|
||||
echo "Directory not found: $directory"
|
||||
return 1
|
||||
end
|
||||
set jump (fd -t d . $directory | fzf)
|
||||
and cd $jump $argv;
|
||||
end
|
||||
|
@ -5,4 +5,5 @@ function fish_user_key_bindings
|
||||
bind -M insert \ce 'recent'
|
||||
bind -M insert \cg 'commandline-git-commits'
|
||||
bind -M insert \x1F accept-autosuggestion
|
||||
bind -M default \x1F accept-autosuggestion
|
||||
end
|
||||
|
@ -1,4 +0,0 @@
|
||||
# Defined via `source`
|
||||
function vim --wraps=nvim --description 'alias vim=nvim'
|
||||
nvim $argv;
|
||||
end
|
@ -1,6 +1,7 @@
|
||||
!.env*
|
||||
!.github/
|
||||
!.gitignore
|
||||
!*.tfvars
|
||||
.terraform/
|
||||
.target/
|
||||
/Library/
|
||||
|
Loading…
Reference in New Issue
Block a user