Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rodrigobdz/hide-file-extension-mac

📄 Toggle file extension visibility from CLI for macOS 🍎
https://github.com/rodrigobdz/hide-file-extension-mac

apple-script cli-utilities file-extensions generator-lnm hidden macos npm-module npm-package yarn

Last synced: 10 days ago
JSON representation

📄 Toggle file extension visibility from CLI for macOS 🍎

Awesome Lists containing this project

README

        

# 📄 Hide File Extension 🍎 ![Build status](https://travis-ci.org/rodrigobdz/hide-file-extension-mac.svg?branch=master)

> Toggle file extension visibility from CLI for macOS

## Requirements

- Xcode Command-Line Tools
- Node

## Install

```sh
$ npm install hide-file-extension-mac
```

## Usage

```js
const hideFileExtensionMac = require("hide-file-extension-mac");

// foo.txt
hideFileExtensionMac("foo.txt");
//=> 'foo'

// foo
hideFileExtensionMac("foo.txt", { show: true });
//=> 'foo.txt'
```

## API

### hideFileExtensionMac(input, [options])

#### input

Type: `string`

Path to file.

#### options

Type: `Object`

##### show

Type: `boolean`

Default: `false`

Flag to show or hide file extension.

## CLI

```sh
$ npm install --global hide-file-extension-mac
```

```sh
$ hide-file-extension-mac --help

Usage
hide-file-extension-mac [input]

Options
--show, -s Show extensions [Default: false]

Examples
$ hide-file-extension-mac --show foo.txt
# foo.txt
$ hide-file-extension-mac foo.txt
# foo
```

## Credits

* [generator-lnm](https://github.com/rodrigobdz/generator-lnm) - Awesome node module generator

## License

[MIT](license) © [Rodrigo Bermudez Schettino](https://rodrigobdz.github.io)