Skip to content

SuJiKiNen/pyfiledir

Repository files navigation

Build Status

PlatformPython VersionStatus
ubuntu3.5https://dev.azure.com/sujikinen/pyfiledir/_apis/build/status/SuJiKiNen.pyfiledir?branchName=master&jobName=tests&configuration=tests%20Python35_Linux#.svg
3.6https://dev.azure.com/sujikinen/pyfiledir/_apis/build/status/SuJiKiNen.pyfiledir?branchName=master&jobName=tests&configuration=tests%20Python36_Linux#.svg
3.7https://dev.azure.com/sujikinen/pyfiledir/_apis/build/status/SuJiKiNen.pyfiledir?branchName=master&jobName=tests&configuration=tests%20Python37_Linux#.svg
3.8https://dev.azure.com/sujikinen/pyfiledir/_apis/build/status/SuJiKiNen.pyfiledir?branchName=master&jobName=tests&configuration=tests%20Python38_Linux#.svg
macos3.5https://dev.azure.com/sujikinen/pyfiledir/_apis/build/status/SuJiKiNen.pyfiledir?branchName=master&jobName=tests&configuration=tests%20Python35_MacOS#.svg
3.6https://dev.azure.com/sujikinen/pyfiledir/_apis/build/status/SuJiKiNen.pyfiledir?branchName=master&jobName=tests&configuration=tests%20Python36_MacOS#.svg
3.7https://dev.azure.com/sujikinen/pyfiledir/_apis/build/status/SuJiKiNen.pyfiledir?branchName=master&jobName=tests&configuration=tests%20Python37_MacOS#.svg
3.8https://dev.azure.com/sujikinen/pyfiledir/_apis/build/status/SuJiKiNen.pyfiledir?branchName=master&jobName=tests&configuration=tests%20Python38_MacOS#.svg
windows3.5https://dev.azure.com/sujikinen/pyfiledir/_apis/build/status/SuJiKiNen.pyfiledir?branchName=master&jobName=tests&configuration=tests%20Python35_Windows#.svg
3.6https://dev.azure.com/sujikinen/pyfiledir/_apis/build/status/SuJiKiNen.pyfiledir?branchName=master&jobName=tests&configuration=tests%20Python36_Windows#.svg
3.7https://dev.azure.com/sujikinen/pyfiledir/_apis/build/status/SuJiKiNen.pyfiledir?branchName=master&jobName=tests&configuration=tests%20Python37_Windows#.svg
3.8https://dev.azure.com/sujikinen/pyfiledir/_apis/build/status/SuJiKiNen.pyfiledir?branchName=master&jobName=tests&configuration=tests%20Python38_Windows#.svg

Demo

demo.svg

Environment Variables

Environment variable nameDefault valueExplanation
PYFILEDIR_CANDIDATE_SEP\nhow pyfiledir join candidates
PYFILEDIR_WILDCARD,wildcard character when doing match
PYFILEDIR_ADD_TRAILING_SLASHTrueadd trailing slash for directory candidate
PYFILEDIR_KEEP_LEADING_DOT_SLASHTruekeep leading ./ in path
PYFILEDIR_COMPLETE_COMMON_PREFIXTruecomplete common prefix of candidates first
PYFILEDIR_EXPAND_TIDLEFalseexpand ~ to /home/<user>
PYFILEDIR_IGNORE_CASETruecompletion ignore case
PYFILEDIR_USE_UNIHAN_DICTTrueuse rich Unihan dict
PYFILEDIR_USE_NATURAL_SORTFalseuse natural sort, sorting filenames

pyfiledir default following some behaviors from .inputrc, see equivalents below:

INPUTRC setting namePYFILEDIR environment variable name
mark-directoriesPYFILEDIR_ADD_TRAILING_SLASH
completion-ignore-casePYFILEDIR_IGNORE_CASE
expand-tildePYFILEDIR_EXPAND_TIDLE

Development Guide

Create Demo

python helper/create_demo.py &

Profiling

requirements: python 3.7

python -m cProfile -m pyfiledir [option] <arg>

testing

enable pyfiledir tests verbose debug.

pytest --pyfiledir-debug -s

PYTEST_ADDOPTS='--pyfiledir-debug -s' pytest

Installation

readline

if you don't like default key binding ALT+/,
   you could define your own key binding.

add following lines to your .bashrc.

source shell/readline_completion.bash

source shell/readline_key_binding.bash

Releases

No releases published

Packages

No packages published