Switch to generic hash instead of sha1 specifically

Suggested by @maximbaz
This commit is contained in:
Robert Ricci 2018-06-04 15:43:03 -06:00
parent a9f394ce18
commit da6ad5df45
2 changed files with 5 additions and 5 deletions

View File

@ -244,8 +244,8 @@ def functions_for(args):
post_processors.extend((brackets, quotes))
elif args.type == 'line':
pattern = '(?m)^\\s*(.+)[\\s\0]*$'
elif args.type == 'sha1':
pattern = '[0-9a-f]{7,40}'
elif args.type == 'hash':
pattern = '[0-9a-f]{7,128}'
elif args.type == 'word':
chars = args.word_characters
if chars is None:
@ -315,7 +315,7 @@ terminal window instead. A value of :file:`@` will copy the match to the clipboa
--type
default=url
choices=url,regex,path,line,sha1,word
choices=url,regex,path,line,hash,word
The type of text to search for.

View File

@ -490,9 +490,9 @@ map kitty_mod+e kitten hints
# run git commands on a filename output from a previous git command.
map kitty_mod+p>f kitten hints --type path --program -
# Select something that looks like a SHA1 hash and insert it into the terminal.
# Select something that looks like a hash and insert it into the terminal.
# Useful with git, which uses sha1 hashes to identify commits
map kitty_mod+p>s kitten hints --type sha1 --program -
map kitty_mod+p>h kitten hints --type hash --program -
# Select a path/filename and open it with the default open program.
map kitty_mod+p>shift+f kitten hints --type path