-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #85 from sbulav/dev
Dev
- Loading branch information
Showing
30 changed files
with
329 additions
and
359 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,3 @@ | ||
# Change working dir in fish to last dir in lf on exit (adapted from ranger). | ||
# | ||
# You may put this file to a directory in $fish_function_path variable: | ||
# | ||
# mkdir -p ~/.config/fish/functions | ||
# ln -s "/path/to/lfcd.fish" ~/.config/fish/functions | ||
# | ||
# You may also like to assign a key to this command: | ||
# | ||
# bind \co 'set old_tty (stty -g); stty sane; lfcd; stty $old_tty; commandline -f repaint' | ||
# | ||
# You may put this in a function called fish_user_key_bindings. | ||
|
||
function l #--description 'lf with changing dir' | ||
set tmp (mktemp) | ||
lf -last-dir-path=$tmp $argv | ||
if test -f "$tmp" | ||
set dir (cat $tmp) | ||
rm -f $tmp | ||
if test -d "$dir" | ||
if test "$dir" != (pwd) | ||
cd $dir | ||
end | ||
end | ||
end | ||
function l --description 'alias l=ls -la' | ||
la -la | ||
end |
Oops, something went wrong.