├── .gitignore ├── README.md ├── doc ├── TODO.md ├── USAGE.md ├── fzf-fs.d │ ├── console │ │ ├── cd │ │ ├── edit │ │ ├── open_with │ │ ├── page │ │ ├── set │ │ │ ├── clicolor_force_false │ │ │ ├── clicolor_force_toggle │ │ │ ├── clicolor_force_true │ │ │ ├── deference │ │ │ ├── deference_commandline │ │ │ ├── lc_collate_c │ │ │ ├── lc_collate_lang │ │ │ ├── opener_console_default │ │ │ ├── opener_console_editor │ │ │ ├── opener_console_pager │ │ │ ├── opener_default │ │ │ ├── opener_editor │ │ │ ├── opener_interactive │ │ │ ├── opener_pager │ │ │ ├── os_interactive │ │ │ ├── show_atime │ │ │ ├── show_ctime │ │ │ ├── show_hidden_false │ │ │ ├── show_hidden_toggle │ │ │ ├── show_hidden_true │ │ │ ├── show_mtime │ │ │ ├── sort_atime │ │ │ ├── sort_basename │ │ │ ├── sort_ctime │ │ │ ├── sort_interactive │ │ │ ├── sort_mtime │ │ │ ├── sort_reverse_false │ │ │ ├── sort_reverse_toggle │ │ │ ├── sort_reverse_true │ │ │ ├── sort_size │ │ │ └── sort_type │ │ ├── shell │ │ └── terminal │ └── env │ │ ├── browser_shortcuts.default │ │ ├── browser_shortcuts.user │ │ ├── console_shortcuts.default │ │ ├── console_shortcuts.user │ │ ├── env.default │ │ ├── env.user │ │ ├── flags.default │ │ ├── flags.user │ │ ├── macros.default │ │ └── macros.user └── screenshot_0.2.2.gif ├── fzf-fs └── fzf-fs-init /.gitignore: -------------------------------------------------------------------------------- 1 | CHANGES 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | "fzf-fs" "1" "Thu Apr 16 11:09:48 UTC 2015" "0.2.2" "README" 2 | 3 | ##### README 4 | 5 | [fzf-fs](https://github.com/D630/fzf-fs) acts like a very simple and configurable file browser/navigator for the command line by taking advantage of the general-purpose fuzzy finder [fzf](https://github.com/junegunn/fzf). Although coming without Miller columns, fzf-fs is inspired by tools like [lscd](https://github.com/hut/lscd) and [deer](https://github.com/vifon/deer), which both follow the example set by [ranger](https://github.com/hut/ranger). 6 | 7 | ![](https://raw.githubusercontent.com/D630/fzf-fs/master/doc/screenshot_0.2.2.gif) 8 | 9 | ##### BUGS & REQUESTS 10 | 11 | Get in touch with fzf-fs by reading the [USAGE](../master/doc/USAGE.md) text file and have also a look at the [TODO](../master/doc/TODO.md) document. Feel free to open an issue or put in a pull request on https://github.com/D630/fzf-fs 12 | 13 | ##### GIT 14 | 15 | To download the very latest source code: 16 | 17 | ``` 18 | git clone https://github.com/D630/fzf-fs 19 | ``` 20 | 21 | If you want to use the latest tagged version, do also something like this: 22 | 23 | ``` 24 | cd ./fzf-fs 25 | git checkout $(git describe --abbrev=0 --tags) 26 | ``` 27 | 28 | ##### NOTICE 29 | 30 | fzf-fs follows the [Utilities portion of the POSIX specification](http://pubs.opengroup.org/stage7tc1/utilities/V3_chap04.html#tag_20) and has been written in [GNU bash](http://www.gnu.org/software/bash/) on [Debian GNU/Linux 8 (jessie)](https://www.debian.org) with these programs/packages: 31 | 32 | - GNU bash 4.3.30(1)-release 33 | - GNU coreutils 8.23: basename, echo, ls, md5sum, mkdir, mkfifo, paste, printf, rm, sort, uname 34 | - GNU findutils 4.4.2: find 35 | - GNU nano version 2.2.6 36 | - GNU sed 4.2.2 37 | - MIRBSD KSH R50 2014/10/19 Debian-5 38 | - XTerm(312) 39 | - fzf 0.9.8 (Go version) 40 | - less 458 (GNU regular expressions) 41 | - ncurses 5.9.20140913: tput 42 | - zsh 5.0.7 43 | 44 | [mksh](https://www.mirbsd.org/mksh.htm) and [zsh](http://www.zsh.org/) users are not excluded from fzf-fs. I have been trying to keep sight [of](https://github.com/D630/fzf-fs/issues/3) [portability](https://github.com/D630/fzf-fs/issues/4). 45 | 46 | ##### LICENCE 47 | 48 | Same [license](https://github.com/junegunn/fzf#license) like in fzf. fzf-fs contains a (modified) function, that is part of [liquidprompt](https://github.com/nojhan/liquidprompt/blob/master/liquidprompt). 49 | -------------------------------------------------------------------------------- /doc/TODO.md: -------------------------------------------------------------------------------- 1 | "fzf-fs" "1" "Thu Apr 16 11:09:48 UTC 2015" "0.2.2" "TODO" 2 | 3 | ##### TO DO 4 | 5 | - "VIEW MODE" with multi handling to cut, paste etc. and create more macros 6 | - "buffer" handling and interaction 7 | - keybindings => implement fzf --expect 8 | - multiselection in fzf 9 | - give -e option to evaluate console commands on start up 10 | - more console commands and integration of tools like z, history, bookmarks 11 | - check all against mksh and zsh 12 | - comments 13 | - take OS X into consideration 14 | - rewrite code from liquidprompt 15 | - checkout, how to work with multiplexers and/or embedding of tty emulators 16 | - think about fzf-completion.bash 17 | - by-product: make a better xdg-open via lessopen/lesspipe and with support for all relevant mime types... 18 | -------------------------------------------------------------------------------- /doc/USAGE.md: -------------------------------------------------------------------------------- 1 | "fzf-fs" "1" "Thu Apr 16 11:09:48 UTC 2015" "0.2.2" "USAGE" 2 | 3 | ##### USAGE 4 | 5 | ```sh 6 | Usage 7 | [ . ] fzf-fs [ -h | -i | -v | ] 8 | 9 | Options 10 | -h, --help Show this instruction 11 | -i, --init Initialize configuration directory 12 | -v, --version Print version 13 | 14 | Environment variables 15 | FZF_FS_CONFIG_DIR 16 | ${XDG_CONFIG_HOME:-${HOME}/.config}/fzf-fs.d 17 | ``` 18 | 19 | At first, put `fzf-fs` and `fzf-fs-init` on your PATH and initialize the config and working directory with 20 | 21 | ```sh 22 | fzf-fs --init 23 | ``` 24 | 25 | To source `fzf-fs`, you may use a shell alias like 26 | 27 | ```sh 28 | alias f='. fzf-fs' 29 | ``` 30 | 31 | and run it like 32 | 33 | ```sh 34 | f 35 | f . 36 | f .. 37 | f - 38 | f / 39 | ``` 40 | 41 | After starting up, you are confronted with a list of file and command entries in a cursed-based fullscreen session of fzf. I call it the "browser pane"; it runs in a while loop and is the starting as well as the endpoint of each session: 42 | 43 | ``` 44 | drwxr-xr-x 4 user1 user1 4096 Mar 22 01:09 . 45 | drwxr-xr-x 23 user1 user1 4096 Mar 11 01:00 .. 46 | drwx------ 8 user1 user1 4096 Mar 21 09:26 .git 47 | -rwx------ 1 user1 user1 2149 Mar 22 00:45 README.md 48 | drwx------ 2 user1 user1 4096 Mar 22 01:07 doc 49 | -rwx------ 1 user1 user1 15781 Mar 22 01:09 fzf-fs.sh 50 | [-] console/cd $OLDPWD 51 | [~] console/cd $HOME 52 | [q] quit 53 | [:] console 54 | [/] console/cd $browser_root 55 | > [!] console/shell 56 | 12/12 57 | [~/var/code/projects/fzf-fs] :: 58 | ``` 59 | 60 | You may only browse your file system by selecting lines in the browser. It is like cd-ing on the command line, but with all fuzzy matching and extended-searching qualities of fzf. You should set the environment variable FZF_FS_OPENER at least to open files. If you are in the dark, what opener to use, have a look at [this](https://wiki.archlinux.org/index.php/xdg-open). Entries, which begin with a bracket, refer to configurable console commands. See also section [SHORTCUTS](#shortcuts). 61 | 62 | If you have problems with displaying the ls output, have a look at the environment variables FZF_FS_LS_COMMAND and FZF_FS_LS_COMMAND_COLOR. They are preconfigured after `fzf-fs --init`. 63 | 64 | ##### ENVIRONMENT 65 | 66 | You can set the following environment variables on the command line or modify them in `env/env.user`: 67 | 68 | ``` 69 | EDITOR Fallback: nano 70 | FZF_DEFAULT_COMMAND Internally set to: "command echo uups" 71 | FZF_DEFAULT_OPTS Internally unset 72 | FZF_FS_DEFAULT_OPTS Additional fzf options in the browser pane. --prompt 73 | and --with-nth cannot be used. Fallback: "-x -i" 74 | FZF_FS_LS_CLICOLOR 0/1. Fallback: 1 75 | FZF_FS_LS_COMMAND Default ls command, depends on your OS and version of 76 | ls. In GNU ls it is "ls --color=auto"; on FreeBSD 77 | and alike it is "ls -G". See fzf-fs-init 78 | FZF_FS_LS_COMMAND_COLOR In GNU ls it is "ls --color=always"; on FreeBSD and 79 | alike it is "CLICOLOR_FORCE=1 ls -G". See fzf-fs-init 80 | FZF_FS_LS_HIDDEN 0/1. Fallback: 1 81 | FZF_FS_LS_OPTS Additional ls options in the browser pane. l and i 82 | cannot be used. Fallback: NULL 83 | FZF_FS_LS_REVERSE 0/1. Fallback: 1 84 | FZF_FS_LS_SYMLINK Fallback: NULL 85 | FZF_FS_OPENER Fallback: PAGER 86 | FZF_FS_OPENER_CONSOLE Fallback: NULL 87 | FZF_FS_OS Output of "uname -s". Fallback: "Linux" 88 | FZF_FS_SORT See sort_interactive in the setting section. 89 | Fallback: NULL 90 | LC_COLLATE Internally set to: "C" 91 | PAGER Fallback: "less -R" 92 | TERMINAL Fallback: "xterm" 93 | ``` 94 | 95 | FZF_FS_CONFIG_DIR needs to be set on the command line. Default value is `${XDG_CONFIG_HOME:-${HOME}/.config}/fzf-fs.d`. 96 | 97 | ##### CONSOLE COMMANDS 98 | 99 | ``` 100 | cd Change the working directory in the browser pane 101 | console Show the console pane 102 | edit Edit file in EDITOR 103 | open_with Execute command list in the current shell. When used 104 | inside of the browser pane, FZF_FS_OPENER will be 105 | read. 106 | page Open file in PAGER 107 | shell [-flags] Execute SHELL 108 | terminal Execute TERMINAL in the background. Open its shell 109 | in the current directory of the browser pane 110 | set