FOSSPicks

CliFM

Despite the terminal being the place for copying, renaming, deleting, and organizing files, text-based file managers have always been popular. They can help remove some of the jeopardy in using commands to do important things to your data, especially when multiple files or directories are involved, and a file manager is obviously more visual. This can make it easier to navigate and explore filesystems you may not be familiar with. Miguel de Icaza famously started his career by writing Midnight Commander for Linux in 1994, before starting the Gnome project in 1997, and his venerable mc command is still the one many of us resort to when we want to visualize files and directories on the command line. But as entrenched in our collective history as Midnight Commander is, there's always room for a command-line tool that tries to take a different approach.

The big difference with CliFM is that it doesn't use TUI to build a text-based representation of a graphical interface. As a result, its interface feels a lot more authentic and true to traditional Unix tools and philosophy – and it does this without forgoing either intuitiveness or capabilities. The main view presents a numbered list for the directories and files in the current location. Selecting a number and pressing Return will either enter a directory or present a context-sensitive menu for files. If you select an archive, for example, you can choose between extracting, listing, mounting, and repacking the files it contains, and it's the same for lots of other supported file types. You can also issue commands, such as m, c, or r to move, copy, or delete a numbered file or directory respectively. Multiple entries can be selected interactively, or with the s command, and it all feels like playing an ancient interactive fiction game with your filesystem. Which isn't a bad thing!

Project Website

https://github.com/leo-arch/clifm

The prompt in CliFM gives you access to its file manager features, but also passes commands through to your shell for the best of both worlds.

Markdown linting

markdownlint

Using the Markdown syntax for writing text documentation has become almost the default for many projects and writers. It's easy to learn and understand, and it treads lightly on the readability of the raw document when you don't have a Markdown preview. You don't need to understand Markdown to know which parts are titles, lists, or links to other pages, and Markdown can be ingested by many services and turned into beautifully rendered web pages or structured documentation. It's GitHub's default for good reason. But there also are a couple of big problems with Markdown, and they're related: There's no agreed global Markdown standard and there are many tweaked derivatives of definitions that become standards in their own domain. Even GitHub supports two, kramdown and its own GitHub Flavored Markdown (GFM).

Despite this confusion and complexity, and its use in development projects with their own CI systems, there are very few tools that can check the validity of Markdown according to your own whims and requirements. However, markdownlint is one of these few, and it's also the most adaptable for multiple standards of Markdown. It's a command (typed as mdl) that takes a Markdown file as an argument and reports back on any problems with the syntax used within the file. Each problem is reported with a line number, error code, and text description, such as "Inline HTML" or "Lists should be surrounded by blank lines." There are 47 such rules, from correctly incrementing headings to ending a file with a single newline character, and they comprehensively cover the majority of issues you're likely to encounter. Broken rules are called style issues by markdownlint and, like Markdown itself, styles can be added or created to match your preferred flavor of Markdown. The syntax for this is also straightforward, such as rule 'MD013', :line_length => 500 to test for lines longer than 500 characters. All of this is ideal for integration with a CI system that can check every commit, but it's equally useful on the command line and a great solution if you ever do any work with Markdown.

Project Website

https://github.com/markdownlint/markdownlint

If you ever work with text-based Markdown files, markdownlint helps you make sure you've got the syntax correct.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Swiss Army Knife

    Pandoc lets you convert files from one markup format to another at the command line.

  • Pandoc Website

    Build a simple web page in Markdown; then convert it to HTML at the command line.

  • Tutorials – Markdown

    Create attractive and structured documents from the comfort of your text editor – and convert them to a huge array of formats.

  • Dillinger: Markdown Editor Done Right
  • KiCad

    KiCad helps you design printed circuit boards with up to 32 layers, checks for optimal placement, and supplies schematics and assembly diagrams in the popular Gerber format for submission to PCB manufacturers.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News