Skip to content

Commit

Permalink
feat: Skip non-files/non-symlinks when listing aliases
Browse files Browse the repository at this point in the history
Resolves #89
  • Loading branch information
yermulnik committed Aug 29, 2024
1 parent c028d93 commit a6c8cae
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/aliases.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def remove(name)
def each(only)
Dir["#{BASE_DIR}/*"].each do |path|
next if path.end_with? "~" # skip Emacs-like backup files
next if File.directory?(path) # skip directories

_shebang, _meta, *lines = File.readlines(path)
target = File.basename(path)
Expand Down

0 comments on commit a6c8cae

Please sign in to comment.