summaryrefslogtreecommitdiff
path: root/snippets/ess-mode/command-args
blob: 43b634600a0f6e791fa16311020a951e4f53dabb (plain)
1
2
3
4
5
6
7
8
# -*- mode: snippet -*-
# key: cargs
# --
args <- commandArgs(trailingOnly = TRUE)
if (length(args) != $1)
    stop("Usage: `(file-name-nondirectory (buffer-file-name))` $2")

$0 <- args[1]