Skip to content

Instantly share code, notes, and snippets.

@daveio
Last active July 22, 2025 13:14
Show Gist options
  • Save daveio/de1c40f29c41c8504436bd5733e1b6cd to your computer and use it in GitHub Desktop.
Save daveio/de1c40f29c41c8504436bd5733e1b6cd to your computer and use it in GitHub Desktop.
Warp rules

Warp rules

Line endings

Use UNIX-style line endings.

We are using fish

Default shell is fish. If you want to use a different shell (e.g., bash), that's fine, but you must include the correct shebang.

HEREDOC

Don't use HEREDOCs to create files. They have problems with the fish shell. If you must use them, create a bash script with a shebang to do it and execute it from disk, or use bash -c.

Avoid git and gh pager

When running git or gh, pipe to cat to avoid the pager and read the output successfully.

Example: git log | cat

Markdown output with glow

If you print Markdown to the console, and aren't using the Warp internal formatting, use glow to mark it up for the terminal.

$ glow --help
                                                                              
  Render markdown on the CLI, with pizzazz!

Usage:
  glow [SOURCE|DIR] [flags]
  glow [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  config      Edit the glow config file
  help        Help about any command
  stash       Stash a markdown

Flags:
  -a, --all             show system files and directories (TUI-mode only)
      --config string   config file (default /Users/dave/Library/Preferences/glow/glow.yml)
  -h, --help            help for glow
  -l, --local           show local files only; no network (TUI-mode only)
  -p, --pager           display with pager
  -s, --style string    style name or JSON path (default "auto")
  -v, --version         version for glow
  -w, --width uint      word-wrap at width

Use "glow [command] --help" for more information about a command.

jc is available

You can use jc to turn command output into JSON to aid your understanding or for mangling with jq.

Using jc is OPTIONAL.

From the jc documentation, to show you what parsers exist and what you can pipe to jc:

Parsers

Argument Command or Filetype Documentation
--acpi acpi command parser details
--airport airport -I command parser details
--airport-s airport -s command parser details
--amixer amixer command parser details
--apt-cache-show apt-cache show command parser details
--apt-get-sqq apt-get -sqq command parser details
--arp arp command parser details
--asciitable ASCII and Unicode table parser details
--asciitable-m multi-line ASCII and Unicode table parser details
--blkid blkid command parser details
--bluetoothctl bluetoothctl command parser details
--cbt cbt (Google Bigtable) command parser details
--cef CEF string parser details
--cef-s CEF string streaming parser details
--certbot certbot command parser details
--chage chage --list command parser details
--cksum cksum and sum command parser details
--clf Common and Combined Log Format file parser details
--clf-s Common and Combined Log Format file streaming parser details
--crontab crontab command and file parser details
--crontab-u crontab file parser with user support details
--csv CSV file parser details
--csv-s CSV file streaming parser details
--curl-head curl --head command parser details
--date date command parser details
--datetime-iso ISO 8601 Datetime string parser details
--debconf-show debconf-show command parser details
--df df command parser details
--dig dig command parser details
--dir dir command parser details
--dmidecode dmidecode command parser details
--dpkg-l dpkg -l command parser details
--du du command parser details
--efibootmgr efibootmgr command parser details
--email-address Email Address string parser details
--env env command parser details
--ethtool ethtool command parser details
--file file command parser details
--find find command parser details
--findmnt findmnt command parser details
--finger finger command parser details
--free free command parser details
--fstab /etc/fstab file parser details
--git-log git log command parser details
--git-log-s git log command streaming parser details
--git-ls-remote git ls-remote command parser details
--gpg gpg --with-colons command parser details
--group /etc/group file parser details
--gshadow /etc/gshadow file parser details
--hash hash command parser details
--hashsum hashsum command parser (md5sum, shasum, etc.) details
--hciconfig hciconfig command parser details
--history history command parser details
--host host command parser details
--hosts /etc/hosts file parser details
--http-headers HTTP headers parser details
--id id command parser details
--ifconfig ifconfig command parser details
--ini INI file parser details
--ini-dup INI with duplicate key file parser details
--iostat iostat command parser details
--iostat-s iostat command streaming parser details
--ip-address IPv4 and IPv6 Address string parser details
--ipconfig ipconfig Windows command parser details
--iptables iptables command parser details
--ip-route ip route command parser details
--iw-scan iw dev [device] scan command parser details
--iwconfig iwconfig command parser details
--jar-manifest Java MANIFEST.MF file parser details
--jobs jobs command parser details
--jwt JWT string parser details
--kv Key/Value file and string parser details
--kv-dup Key/Value with duplicate key file and string parser details
--last last and lastb command parser details
--ls ls command parser details
--ls-s ls command streaming parser details
--lsattr lsattr command parser details
--lsb-release lsb_release command parser details
--lsblk lsblk command parser details
--lsmod lsmod command parser details
--lsof lsof command parser details
--lspci lspci -mmv command parser details
--lsusb lsusb command parser details
--m3u M3U and M3U8 file parser details
--mdadm mdadm command parser details
--mount mount command parser details
--mpstat mpstat command parser details
--mpstat-s mpstat command streaming parser details
--needrestart needrestart -b command parser details
--netstat netstat command parser details
--nmcli nmcli command parser details
--nsd-control nsd-control command parser details
--ntpq ntpq -p command parser details
--openvpn openvpn-status.log file parser details
--os-prober os-prober command parser details
--os-release /etc/os-release file parser details
--pacman pacman command parser details
--passwd /etc/passwd file parser details
--path POSIX path string parser details
--path-list POSIX path list string parser details
--pci-ids pci.ids file parser details
--pgpass PostgreSQL password file parser details
--pidstat pidstat -H command parser details
--pidstat-s pidstat -H command streaming parser details
--ping ping and ping6 command parser details
--ping-s ping and ping6 command streaming parser details
--pip-list pip list command parser details
--pip-show pip show command parser details
--pkg-index-apk Alpine Linux Package Index file parser details
--pkg-index-deb Debian Package Index file parser details
--plist PLIST file parser details
--postconf postconf -M command parser details
--proc /proc/ file parser details
--ps ps command parser details
--resolve-conf /etc/resolve.conf file parser details
--route route command parser details
--rpm-qi rpm -qi command parser details
--rsync rsync command parser details
--rsync-s rsync command streaming parser details
--semver Semantic Version string parser details
--sfdisk sfdisk command parser details
--shadow /etc/shadow file parser details
--srt SRT file parser details
--ss ss command parser details
--ssh-conf ssh config file and ssh -G command parser details
--sshd-conf sshd config file and sshd -T command parser details
--stat stat command parser details
--stat-s stat command streaming parser details
--swapon swapon command parser details
--sysctl sysctl command parser details
--syslog Syslog RFC 5424 string parser details
--syslog-s Syslog RFC 5424 string streaming parser details
--syslog-bsd Syslog RFC 3164 string parser details
--syslog-bsd-s Syslog RFC 3164 string streaming parser details
--systemctl systemctl command parser details
--systemctl-lj systemctl list-jobs command parser details
--systemctl-ls systemctl list-sockets command parser details
--systemctl-luf systemctl list-unit-files command parser details
--systeminfo systeminfo command parser details
--time /usr/bin/time command parser details
--timedatectl timedatectl status command parser details
--timestamp Unix Epoch Timestamp string parser details
--toml TOML file parser details
--top top -b command parser details
--top-s top -b command streaming parser details
--tracepath tracepath and tracepath6 command parser details
--traceroute traceroute and traceroute6 command parser details
--tune2fs tune2fs -l command parser details
--udevadm udevadm info command parser details
--ufw ufw status command parser details
--ufw-appinfo ufw app info [application] command parser details
--uname uname -a command parser details
--update-alt-gs update-alternatives --get-selections command parser details
--update-alt-q update-alternatives --query command parser details
--upower upower command parser details
--uptime uptime command parser details
--url URL string parser details
--ver Version string parser details
--veracrypt veracrypt command parser details
--vmstat vmstat command parser details
--vmstat-s vmstat command streaming parser details
--w w command parser details
--wc wc command parser details
--wg-show wg show command parser details
--who who command parser details
--x509-cert X.509 PEM and DER certificate file parser details
--x509-csr X.509 PEM and DER certificate request file parser details
--xml XML file parser details
--xrandr xrandr command parser details
--yaml YAML file parser details
--zipinfo zipinfo command parser details
--zpool-iostat zpool iostat command parser details
--zpool-status zpool status command parser details

Options

Short Long Description
-a --about About jc. Prints information about jc and the parsers (in JSON or YAML, of course!)
-C --force-color Force color output even when using pipes (overrides -m and the NO_COLOR env variable)
-d --debug Debug mode. Prints trace messages if parsing issues are encountered (use-dd for verbose debugging)
-h --help Help. Use jc -h --parser_name for parser documentation. Use twice to show hidden parsers (e.g. -hh). Use thrice to show parser categories (e.g. -hhh).
-m --monochrome Monochrome output
-M --meta-out Add metadata to output including timestamp, parser name, magic command, magic command exit code, etc.
-p --pretty Pretty format the JSON output
-q --quiet Quiet mode. Suppresses parser warning messages (use -qq to ignore streaming parser errors)
-r --raw Raw output. Provides more literal output, typically with string values and no additional semantic processing
-s --slurp Slurp multiple lines into an array. (use -hhh to find compatible parsers)
-u --unbuffer Unbuffer output
-v --version Version information
-y --yaml-out YAML output
-B --bash-comp Generate Bash shell completion script (more info)
-Z --zsh-comp Generate Zsh shell completion script (more info)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment