Skip to main content

Autocomplete nvim recent files in command line

Installation

Install the python package

pip install nfasd

Add the following line in your ~/.bashrc

eval "$(register-python-argcomplete-menu nfasd)"

# use TAB to cycle through all possible matches
# optional but highly recommended
[[ $- = *i* ]] && bind TAB:menu-complete

Alternatively, if you use zsh, add the following to ~/.zshrc

eval "$(register-python-argcomplete-menu nfasd)"
# stop shell from beeping for every complete
# optional but highly recommended
setopt NO_LIST_BEEP

For fish shell, you need to install

pip install argcomplete
register-python-argcomplete --shell fish my-favourite-script.py > ~/.config/fish/my-favourite-script.py.fish

Configuration

Add the following to ~/.bashrc or ~/.zshrc

alias n='nfasd -e nvim'
alias ny='nfasd -e nyaovim'

Then you can press n myPro<tab> to get n ~/myProject

-e specifies which executable to open the file

If you want to exclude certain file patterns, use the –exclude option, e.g.

alias n=`nfasd -e nvim --exclude tmp`

Changelog

1.0 for python3

0.19 for python2

Tips

To increase the number of recent files to 1000, add the following line to your ~/.config/nvim/init.vim

set shada=!,'1000,<50,s10,h

Special Thanks

fasd : the awesome command line tool

Release files for nfasd 2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nfasd 2.0
File Size Uploaded
nfasd-2.0.tar.gz 8.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nfasd 2.0
File Interpreter ABI Platform
nfasd-2.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.4 kB

Release files / nfasd-2.0.tar.gz

Download URL nfasd-2.0.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a2638e0392f92f8c498df9e8c400dbe20b2087c671e33c677d23d6216435508b
BLAKE2b-256 checksum
How to use checksums
c8cbe23e6f2f375f5e0956e6f407302da28eff40d78abd11ad3375c40ee17d69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release files / nfasd-2.0-py3-none-any.whl

Download URL nfasd-2.0-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0cec51c27db07bfc1309ce15817c19386e066b06d4169b016cbc9e1b8652a8e9
BLAKE2b-256 checksum
How to use checksums
d42595587d8a0899c1b1c7bee13afcbb4d41308650bac6fe3a444798653676ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release history Release notifications | RSS feed

This release

2.0 This release

2 release files

1.4

2 release files

1.3

2 release files

1.2

2 release files

1.1

2 release files

1.0

2 release files

0.19

2 release files

0.18

2 release files

0.16

1 release file

0.15

1 release file

0.14

1 release file

0.13

1 release file

0.12

1 release file

0.11

1 release file

0.10

1 release file

0.9

1 release file

0.8

1 release file

0.7

1 release file

0.6

1 release file

0.5

1 release file

0.4

1 release file

0.3

1 release file

0.2

1 release file

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page