22 ms·
Show HN: Quick Command-line File Completion
- superskierpat 11y agoWow this is pretty cool, does it affect the terminals performance though?
- 0942v8653 11y agoDoesn't appear to. It may run slowly itself once you press the hotkey but startup speed is not really affected.
- z1mm32m4n 11y agoThis looks similar to what fzf [1] does. There seems to be a bit of a difference between how it treats files within Git repositories, but other than that I tell what the differences are. [1]: https://github.com/junegunn/fzf https://github.com/junegunn/fzf
- pindexis 11y agoThere is a difference in intention: fzf presents itself as a general fuzzy finder tool. QFC is a specific tool for completing just file/dir path. If you use the two, you will notice the difference quickly. Sorting && Filtering isn't the same, for example: If you write 'bin' and there is a matched directory for that string ('bin'), you will see only the dir path not all files inside the dir. Also, you can arrow keys to navigate between directories. You can also type special characters like '~', '$HOME' etc..
- jetpm 11y agoI always wanted this, typing paths is so annoying. I think the command line got stuck in the last millennium. So much things could be automated there, especially command completion. Why do I have to remember the stupid -xfv parameters for tar or whatever. Computers should be like magic. What could be improved: if I type "nano <ctrl f> index." I see some index.js files but not my index.html file from my node project. Ah ok it's in a different folder, but it would be cool if it showed anyways.
- iokanuon 11y ago>Why do I have to remember the stupid -xfv parameters for tar or whatever. A quite popular handy tool for that: http://www.nongnu.org/atool/ http://www.nongnu.org/atool/
- quantumtremor 11y agoJust add this to your .[bash/zsh]rc: ex () { if [ -f $1 ] ; then case $1 in *.tar.bz2) tar xjf $1 ;; *.tar.gz) tar xzf $1 ;; *.bz2) bunzip2 $1 ;; *.rar) unrar x $1 ;; *.gz) gunzip $1 ;; *.tar) tar xf $1 ;; *.tbz2) tar xjf $1 ;; *.tgz) tar xzf $1 ;; *.zip) unzip $1 ;; *.Z) uncompress $1;; *.7z) 7z x $1 ;; *) echo "'$1' cannot be extracted via ex()" ;; esac else echo "'$1' is not a valid file" fi }
- throwaway_555 11y agoLook into fish shell. It does this and more. Or iterm2 does similar.
- Trufa 11y agoFish shell does a lot of stuff, I know it's pretty good but I personally don't want it, I do really like this particular feature. I don't know if I'm a very narrow intersection but I'm really happy with this script!
- matrixagent 11y agoiTerm2 does something like that? How/what? I've been using it for years and never heard of that, looks like once again I've been missing out on something incredibly useful for way too long. :)
- crcastle 11y agohttp://www.iterm2.com/version3.html http://www.iterm2.com/version3.html