An Empirical Investigation of Command-Line Customization

Total Page:16

File Type:pdf, Size:1020Kb

An Empirical Investigation of Command-Line Customization An Empirical Investigation of Command-Line Customization Michael Schröder Jürgen Cito TU Wien TU Wien Vienna, Austria Vienna, Austria [email protected] Massachusetts Institute of Technology Cambridge, U.S.A. [email protected] ABSTRACT the particularities of syntax and argument combinations, instead of The interactive command line, also known as the shell, is a promi- enabling them to use a more recognizable symbol (as in graphical nent mechanism used extensively by a wide range of software pro- user interfaces). fessionals (engineers, system administrators, data scientists, etc.). A way for these experts to introduce recognizability and cus- Shell customizations can therefore provide insight into the tasks tomize their command-line experience is to attach distinct names they repeatedly perform, how well the standard environment sup- to potentially convoluted, but frequently used, command and argu- ports those tasks, and ways in which the environment could be ment structures, as well as workflows expressed as compositions productively extended or modified. To characterize the patterns of commands. This can be achieved by defining shell aliases. An and complexities of command-line customization, we mined the alias substitutes a given name, the alias, with a string value that collective knowledge of command-line users by analyzing more defines an arbitrarily complex command (or chain of commands). than 2.2 million shell alias definitions found on GitHub. Shell aliases The set of aliases users define provides a window into their prefer- allow command-line users to customize their environment by defin- ences expressed as part of their personal configuration. Many users ing arbitrarily complex command substitutions. Using inductive publicly share these configurations on social coding platforms such coding methods, we found three types of aliases that each enable as GitHub, contributing to a collective knowledge of command-line a number of customization practices: Shortcuts (for nicknam- customizations, which can provide insight into the tasks that expert ing commands, abbreviating subcommands, and bookmarking lo- users repeatedly perform and how well the standard environment cations), Modifications (for substituting commands, overriding supports those tasks. defaults, colorizing output, and elevating privilege), and Scripts (for transforming data and chaining subcommands). We conjecture that 1.1 Contribution identifying common customization practices can point to particular We see our large-scale analysis on command-line user customiza- usability issues within command-line programs, and that a deeper tions manifested in alias definitions as a unique window of oppor- understanding of these practices can support researchers and tool tunity to study how the standard environment of the command developers in designing better user experiences. In addition to our line could be productively extended, modified, and improved. Our analysis, we provide an extensive reproducibility package in the work goes hand in hand with existing efforts to innovate on the form of a curated dataset together with well-documented computa- experience of command lines that employ techniques from research tional notebooks enabling further knowledge discovery and a basis in systems [23, 43], software engineering and programming lan- for learning approaches to improve command-line workflows. guages [10, 54, 55], human-computer interaction [15, 53], and arti- ficial intelligence [1, 24, 31]. Particularly, our extensive qualitative KEYWORDS and quantitative analysis, in conjunction with our dataset, form the command line, customization practices, collective knowledge, in- basis for identifying opportunities for improving command-line ductive coding experience in the following directions: by characterizing customiza- tion practices, we gain a categorical understanding underlying the arXiv:2012.10206v2 [cs.SE] 6 Aug 2021 1 INTRODUCTION needs and wants of command-line users; based on our analysis, we identify opportunities for innovation and formulate them as A command-line interface, also called a shell, is a textual interface implications, accompanied with concrete scenarios and examples; that allows users to interact with the underlying operating system further, our comprehensive dataset enables the foundation of learn- by issuing commands. Expert users, such as system administrators, ing approaches, as part of learning-based program synthesis [7, 44], software developers, researchers, and data scientists, routinely use automated repair [34], and recommendation systems [32]; finally, the shell as it affords them flexibility and the ability to compose we also see our results and datasets as a basis for usability research multiple commands. They perform a variety of tasks on their sys- that can impact the design of tools and the future of the shell in tems including navigating and interacting with the filesystem (e.g., general. ls, mv, cd), using version control (e.g., git, hg), installing packages We summarize the work in this paper as follows: (e.g., apt-get, npm), or dealing with infrastructure (e.g., docker). Experts can adapt and play with a multitude of commands and • We identified nine Customization Practices, grouped into arguments, chaining them together to create more complex work- three high-level themes: Shortcuts introduce new names. flows. All this versatility introduces a common problem inuser They can be used for nicknaming commands (and correcting interfaces of recognition over recall [37], where users have to recall misspellings in the process), abbreviating subcommands like 1 Michael Schröder and Jürgen Cito git push, and bookmarking locations for quick navigation. 2.1 Usage and Syntax Modifications change the semantics of commands. We can The alias command allows the user to create alias definitions, use these types of aliases for substituting commands, such defining command substitutions. When the shell processes the as replacing more with less, for overriding defaults to cus- command line, it replaces known alias names with their defined tomize commands to personal contexts, which often involves string values. For example, colorizing output, and also running certain commands as root alias ll='ls -l' by elevating privilege. Aliases that combine multiple com- mands are Scripts. They enable many ways of transforming defines the alias name ll, that is replaced by the alias value ls -l. In data using Unix pipes, and allow for automating repetitive this case, ls is the standard command for listing directory contents, workflows by chaining subcommands. with the argument -l specifying a long-form output format. So the • A Curated Dataset of Command-Line Customizations, alias ll (present in many system configurations) is used to specify consisting of over 2.2 million shell aliases collected from a default argument to a commonly used command under a different GitHub. We view our dataset as a playground for fine-grained name. discovery that can benefit researchers, tool-builders, and Alias values can be arbitrarily complex strings and can substitute command-line users; for example, researchers can use this not only simple commands and arguments, but whole chains of knowledge base to discover which commands are frequently commands. The definition used together and how they are combined, while tool-builders alias ducks='du -cksh * | sort -hr | head -n 15' can see how their programs are being customized. We also defines the new command ducks by chaining together three differ- describe the effective mining technique we used to distill this ent command-line tools in order to return the 15 largest files in the knowledge, which allowed us to capture almost the whole current directory. population (94.09 %) of relevant shell configuration files. In general, an alias definition takes the form • We formulate Implications for Improving Command- alias name=value Line Experience that go beyond single customization prac- tices to address shortcomings and tie them to existing user ex- where value can optionally be enclosed in single (') or double perience research. Codifying emergent behavior [14] found (") quotes and name can be any identifier that is a valid command in our customizations enables learning repair rules and dis- name.1 In particular, the alias name can be an existing command, covering workflows. We are able to uncover conceptual de- so a re-definition like sign flaws, where customizations indicate frustrations with alias grep='grep --color=always' underlying command structures, supporting prior research on potential flaws in the conceptual design of certain com- is possible. mands [38]. Based on the prevalence of highly variable com- In the remainder of this paper, we will use the more compact ! mand redefinitions, we propose contextual defaults, the abil- notation a b to indicate an alias that replaces the name a with ity to suggest different command preferences based on user the value b. context [51]. Overall, we find that many customizations deal with the tension of Interactivity vs Scripting: commands be- 2.2 Dotfiles ing used to interactively navigate systems, while at the same Aliases can be entered directly on the command line, in which time being used within scripts for batch-processing. case they are valid until the shell session ends. To make an alias We now describe usage and syntax of aliases as a vehicle for cus- definition permanent, it is common practice to enter it into afile tomization. We further describe our data
Recommended publications
  • Autocad Command Aliases
    AutoCAD and Its Applications Advanced Appendix D AutoCAD Command Aliases Command Alias 3DALIGN 3AL 3DFACE 3F 3DMOVE 3M 3DORBIT 3DO, ORBIT, 3DVIEW, ISOMETRICVIEW 3DPOLY 3P 3DPRINT 3DP, 3DPLOT, RAPIDPROTOTYPE 3DROTATE 3R 3DSCALE 3S 3DWALK 3DNAVIGATE, 3DW ACTRECORD ARR ACTSTOP ARS -ACTSTOP -ARS ACTUSERINPUT ARU ACTUSERMESSAGE ARM -ACTUSERMESSAGE -ARM ADCENTER ADC, DC, DCENTER ALIGN AL ALLPLAY APLAY ANALYSISCURVATURE CURVATUREANALYSIS ANALYSISZEBRA ZEBRA APPLOAD AP ARC A AREA AA ARRAY AR -ARRAY -AR ATTDEF ATT -ATTDEF -ATT Copyright Goodheart-Willcox Co., Inc. Appendix D — AutoCAD Command Aliases 1 May not be reproduced or posted to a publicly accessible website. Command Alias ATTEDIT ATE -ATTEDIT -ATE, ATTE ATTIPEDIT ATI BACTION AC BCLOSE BC BCPARAMETER CPARAM BEDIT BE BLOCK B -BLOCK -B BOUNDARY BO -BOUNDARY -BO BPARAMETER PARAM BREAK BR BSAVE BS BVSTATE BVS CAMERA CAM CHAMFER CHA CHANGE -CH CHECKSTANDARDS CHK CIRCLE C COLOR COL, COLOUR COMMANDLINE CLI CONSTRAINTBAR CBAR CONSTRAINTSETTINGS CSETTINGS COPY CO, CP CTABLESTYLE CT CVADD INSERTCONTROLPOINT CVHIDE POINTOFF CVREBUILD REBUILD CVREMOVE REMOVECONTROLPOINT CVSHOW POINTON Copyright Goodheart-Willcox Co., Inc. Appendix D — AutoCAD Command Aliases 2 May not be reproduced or posted to a publicly accessible website. Command Alias CYLINDER CYL DATAEXTRACTION DX DATALINK DL DATALINKUPDATE DLU DBCONNECT DBC, DATABASE, DATASOURCE DDGRIPS GR DELCONSTRAINT DELCON DIMALIGNED DAL, DIMALI DIMANGULAR DAN, DIMANG DIMARC DAR DIMBASELINE DBA, DIMBASE DIMCENTER DCE DIMCONSTRAINT DCON DIMCONTINUE DCO, DIMCONT DIMDIAMETER DDI, DIMDIA DIMDISASSOCIATE DDA DIMEDIT DED, DIMED DIMJOGGED DJO, JOG DIMJOGLINE DJL DIMLINEAR DIMLIN, DLI DIMORDINATE DOR, DIMORD DIMOVERRIDE DOV, DIMOVER DIMRADIUS DIMRAD, DRA DIMREASSOCIATE DRE DIMSTYLE D, DIMSTY, DST DIMTEDIT DIMTED DIST DI, LENGTH DIVIDE DIV DONUT DO DRAWINGRECOVERY DRM DRAWORDER DR Copyright Goodheart-Willcox Co., Inc.
    [Show full text]
  • Tortoisemerge a Diff/Merge Tool for Windows Version 1.11
    TortoiseMerge A diff/merge tool for Windows Version 1.11 Stefan Küng Lübbe Onken Simon Large TortoiseMerge: A diff/merge tool for Windows: Version 1.11 by Stefan Küng, Lübbe Onken, and Simon Large Publication date 2018/09/22 18:28:22 (r28377) Table of Contents Preface ........................................................................................................................................ vi 1. TortoiseMerge is free! ....................................................................................................... vi 2. Acknowledgments ............................................................................................................. vi 1. Introduction .............................................................................................................................. 1 1.1. Overview ....................................................................................................................... 1 1.2. TortoiseMerge's History .................................................................................................... 1 2. Basic Concepts .......................................................................................................................... 3 2.1. Viewing and Merging Differences ...................................................................................... 3 2.2. Editing Conflicts ............................................................................................................. 3 2.3. Applying Patches ...........................................................................................................
    [Show full text]
  • Top 15 ERP Software Vendors – 2010
    Top 15 ERP Software Vendors – 2010 Profiles of the Leading ERP Vendors Find the best ERP system for your company. For more information visit Business-Software.com/ERP. About ERP Software Enterprise resource planning (ERP) is not a new concept. It was introduced more than 40 years ago, when the first ERP system was created to improve inventory control and management at manufacturing firms. Throughout the 70’s and 80’s, as the number of companies deploying ERP increased, its scope expanded quite a bit to include various production and materials management functions, although it was designed primarily for use in manufacturing plants. In the 1990’s, vendors came to realize that other types of business could benefit from ERP, and that in order for a business to achieve true organizational efficiency, it needed to link all its internal business processes in a cohesive and coordinated way. As a result, ERP was transformed into a broad-reaching environment that encompassed all activities across the back office of a company. What is ERP? An ERP system combines methodologies with software and hardware components to integrate numerous critical back-office functions across a company. Made up of a series of “modules”, or applications that are seamlessly linked together through a common database, an ERP system enables various departments or operating units such as Accounting and Finance, Human Resources, Production, and Fulfillment and Distribution to coordinate activities, share information, and collaborate. Key Benefits for Your Company ERP systems are designed to enhance all aspects of key operations across a company’s entire back-office – from planning through execution, management, and control.
    [Show full text]
  • CS101 Lecture 9
    How do you copy/move/rename/remove files? How do you create a directory ? What is redirection and piping? Readings: See CCSO’s Unix pages and 9-2 cp option file1 file2 First Version cp file1 file2 file3 … dirname Second Version This is one version of the cp command. file2 is created and the contents of file1 are copied into file2. If file2 already exits, it This version copies the files file1, file2, file3,… into the directory will be replaced with a new one. dirname. where option is -i Protects you from overwriting an existing file by asking you for a yes or no before it copies a file with an existing name. -r Can be used to copy directories and all their contents into a new directory 9-3 9-4 cs101 jsmith cs101 jsmith pwd data data mp1 pwd mp1 {FILES: mp1_data.m, mp1.m } {FILES: mp1_data.m, mp1.m } Copy the file named mp1_data.m from the cs101/data Copy the file named mp1_data.m from the cs101/data directory into the pwd. directory into the mp1 directory. > cp ~cs101/data/mp1_data.m . > cp ~cs101/data/mp1_data.m mp1 The (.) dot means “here”, that is, your pwd. 9-5 The (.) dot means “here”, that is, your pwd. 9-6 Example: To create a new directory named “temp” and to copy mv option file1 file2 First Version the contents of an existing directory named mp1 into temp, This is one version of the mv command. file1 is renamed file2. where option is -i Protects you from overwriting an existing file by asking you > cp -r mp1 temp for a yes or no before it copies a file with an existing name.
    [Show full text]
  • UKUI: a Lightweight Desktop Environment Based on Pluggable
    2016 International Conference on Artificial Intelligence and Computer Science (AICS 2016) ISBN: 978-1-60595-411-0 UKUI: A Lightweight Desktop Environment Based on Pluggable Framework for Linux Distribution Jie YU1, Lu SI1,*, Jun MA1, Lei LUO1, Xiao-dong LIU1, Ya-ting KUANG2, Huan PENG2, Rui LI1, Jin-zhu KONG2 and Qing-bo WU1 1College of Computer, National University of Defense Technology, Changsha, China 2Tianjin KYLIN Information Technology Co., Ltd, Tianjin, China *[email protected] *Corresponding author Keywords: Desktop environment, Ubuntu, User interface. Abstract. Ubuntu is an operating system with Linux kernel based on Debian and distributed as free and open-source software. It uses Unity as its default desktop environment, which results in more difficulties of usage for Microsoft Windows users. In this paper, we present a lightweight desktop environment named UKUI based on UbuntuKylin, the official Chinese version of Ubuntu, for Linux distribution. It is designed as a pluggable framework and provides better user experience during human-computer interaction. In order to evaluate the performance of UKUI, a set of testing bench suits were performed on a personal computer. Overall, the results showed that UKUI has better performance compared with Unity. Introduction Linux is a freely available operating system (OS) originated by Linux Torvalds and further developed by thousands of others. Typically, Linux is packaged in a form known as a Linux distribution for both desktop and server use. Some of the most popular mainstream Linux distributions are Red Hat [1], Ubuntu [2], Arch [3], openSUSY [4], Gentoo [5], etc. There are several desktop environments available for nowadays modern Linux distributions, such as XFCE [6], GNOME [7], KDE [8] and LXDE [9].
    [Show full text]
  • Avoiding the Top 10 Software Security Design Flaws
    AVOIDING THE TOP 10 SOFTWARE SECURITY DESIGN FLAWS Iván Arce, Kathleen Clark-Fisher, Neil Daswani, Jim DelGrosso, Danny Dhillon, Christoph Kern, Tadayoshi Kohno, Carl Landwehr, Gary McGraw, Brook Schoenfield, Margo Seltzer, Diomidis Spinellis, Izar Tarandach, and Jacob West CONTENTS Introduction ..................................................................................................................................................... 5 Mission Statement ..........................................................................................................................................6 Preamble ........................................................................................................................................................... 7 Earn or Give, but Never Assume, Trust ...................................................................................................9 Use an Authentication Mechanism that Cannot be Bypassed or Tampered With .................... 11 Authorize after You Authenticate ...........................................................................................................13 Strictly Separate Data and Control Instructions, and Never Process Control Instructions Received from Untrusted Sources ........................................................................................................... 14 Define an Approach that Ensures all Data are Explicitly Validated .............................................16 Use Cryptography Correctly ....................................................................................................................
    [Show full text]
  • Dealing with Document Size Limits
    Dealing with Document Size Limits Introduction The Electronic Case Filing system will not accept PDF documents larger than ten megabytes (MB). If the document size is less than 10 MB, it can be filed electronically just as it is. If it is larger than 10 MB, it will need to be divided into two or more documents, with each document being less than 10 MB. Word Processing Documents Documents created with a word processing program (such as WordPerfect or Microsoft Word) and correctly converted to PDF will generally be smaller than a scanned document. Because of variances in software, usage, and content, it is difficult to estimate the number of pages that would constitute 10 MB. (Note: See “Verifying File Size” below and for larger documents, see “Splitting PDF Documents into Multiple Documents” below.) Scanned Documents Although the judges’ Filing Preferences indicate a preference for conversion of documents rather than scanning, it will be necessary to scan some documents for filing, e.g., evidentiary attachments must be scanned. Here are some things to remember: • Documents scanned to PDF are generally much larger than those converted through a word processor. • While embedded fonts may be necessary for special situations, e.g., trademark, they will increase the file size. • If graphs or color photos are included, just a few pages can easily exceed the 10 MB limit. Here are some guidelines: • The court’s standard scanner resolution is 300 dots per inch (DPI). Avoid using higher resolutions as this will create much larger file sizes. • Normally, the output should be set to black and white.
    [Show full text]
  • HECO-UNIX-Top Cladding Screw Into the Timber
    HECO-UNIX -top Cladding Screw THE UNIQUE CLADDING SCREW WITH CONTRACTION EFFECT APPLICATION EXAMPLES Façade construction Secure and reliable façade fixing Louvred façades 1 2 3 The variable pitch of the HECO-UNIX full The smaller thread pitch means that the Gap free axial fixing of the timber board thread takes hold boards are clamped firmly together via the HECO-UNIX full thread PRODUCT CHARACTERISTICS The HECO-UNIX-top Cladding Screw into the timber. The façade is secured axially via with contraction effect the thread, which increases the pull-out strength. HECO-UNIX-top full thread This results in fewer fastening points and an Timber façades are becoming increasingly popular ultimately more economical façade construction. Contraction effect thanks to the full in both new builds and renovations. This applica - Thanks to the full thread, the sole function of thread with variable thread pitch tion places high demands on fastenings. The the head is to fit the screw drive. As such, the Axial fixing of component façade must be securely fixed to the sub-structure HECO-UNIX-top façade screw has a small and the fixings should be invisible or attractive raised head, which allows simple, concealed Reduced spreading effect thanks to to look at. In addition, the structure must be installation preventing any water penetration the HECO-TOPIX ® tip permanently sound if it is constantly exposed to through the screw. The screws are made of the weather. The HECO-UNIX-top façade screw stainless steel A2, which safely eliminates the Raised countersunk head is the perfect solution to all of these requirements.
    [Show full text]
  • Shell Script & Advance Features of Shell Programming
    Kirti Kaushik et al, International Journal of Computer Science and Mobile Computing, Vol.4 Issue.4, April- 2015, pg. 458-462 Available Online at www.ijcsmc.com International Journal of Computer Science and Mobile Computing A Monthly Journal of Computer Science and Information Technology ISSN 2320–088X IJCSMC, Vol. 4, Issue. 4, April 2015, pg.458 – 462 RESEARCH ARTICLE Shell Script & Advance Features of Shell Programming Kirti Kaushik* Roll No.15903, CS, Department of Computer science, Dronacharya College of Engineering, Gurgaon-123506, India Email: [email protected] Jyoti Yadav Roll No. 15040, CS, Department of Applied Computer science, Dronacharya College of Engineering, Gurgaon-123506, India Email: [email protected] Kriti Bhatia Roll No. 15048, CS, Department of Applied Computer science, Dronacharya College of Engineering, Gurgaon-123506, India Email: [email protected] Abstract-- In this research paper, the idea of shell scripting and writing computer programs is examined and different parts of shell programming are likewise contemplated. A shell script is a PC system intended to be controlled by the UNIX shell which is a charge line translator. The different tongues of shell scripts are thought to be scripting dialects. Regular operations performed by shell scripts incorporate document control, program execution, and printing content. A shell script can give an advantageous variety ofa framework order where unique environment settings, charge alternatives, or post-transforming apply naturally, yet in a manner that permits the new script to still go about as a completely typical UNIX summon. The real ideas like Programming in the Borne and C-shell, in which it would be clarified that how shell programming could be possible in Borne and C-shell.
    [Show full text]
  • Dot at Command Firmware Release 4.0.0 Release 3.3.5
    Product Change Notification Software Release Notes Dot AT Command Firmware Release 4.0.0 Release 3.3.5 MultiTech xDot® MultiTech mDot™ Date: March 30, 2021 Contents Product Change Notification (PCN) Number PCN 03302021-001 (Dot) I. Overview II. Suggested Action Plan I. Overview MultiTech announces the availability of new AT Command III. Release 4.0.0 Overview Firmware for use on MultiTech® Long Range LoRa® Modules: MultiTech xDot® (MTXDOT Series) IV. Release 3.3.5 Overview MultiTech mDot™ (MTDOT Series) V. Schedule New versions are currently available for download and VI. Flashing mDot Firmware evaluation: VII. Part Numbers Impacted Release 4.0.0 (shipping in June 2021) Release 3.3.5 VIII. Mbed OS Overview IX. xDot Overview Release 4.0.0 will released into standard MultiTech product starting in June 2021. Currently, product ships with X. mDot Overview Release 3.2.1 XI. xDot Micro Developer Kit II. Suggested Action Plan XII. Additional Information Customers Review the information in this PCN and forward to Attachments others within your organization who are actively Identifying Firmware Version involved with the development of IoT applications using the MultiTech xDot and MultiTech mDot. Identifying Date of Manufacture Consider downloading the firmware available on MultiTech or Mbed websites to check compatibility mPower & mLinux Software with existing deployments. PCN 03302021-001 (Dot) Page 1 of 12 https://support.multitech.com Review the release schedule for the upcoming firmware release and understand the effect on your manufacturing and deployment schedules. Distributors Forward this announcement to others within your organization who are actively involved in the sale or support of LoRa-enabled sensors.
    [Show full text]
  • Dell EMC Powerstore CLI Guide
    Dell EMC PowerStore CLI Guide May 2020 Rev. A01 Notes, cautions, and warnings NOTE: A NOTE indicates important information that helps you make better use of your product. CAUTION: A CAUTION indicates either potential damage to hardware or loss of data and tells you how to avoid the problem. WARNING: A WARNING indicates a potential for property damage, personal injury, or death. © 2020 Dell Inc. or its subsidiaries. All rights reserved. Dell, EMC, and other trademarks are trademarks of Dell Inc. or its subsidiaries. Other trademarks may be trademarks of their respective owners. Contents Additional Resources.......................................................................................................................4 Chapter 1: Introduction................................................................................................................... 5 Overview.................................................................................................................................................................................5 Use PowerStore CLI in scripts.......................................................................................................................................5 Set up the PowerStore CLI client........................................................................................................................................5 Install the PowerStore CLI client..................................................................................................................................
    [Show full text]
  • Epmp Command Line Interface User Guide
    USER GUIDE ePMP Command Line Interface ePMP Command Line Interface User Manual Table of Contents 1 Introduction ...................................................................................................................................... 3 1.1 Purpose ................................................................................................................................ 3 1.2 Command Line Access ........................................................................................................ 3 1.3 Command usage syntax ...................................................................................................... 3 1.4 Basic information ................................................................................................................. 3 1.4.1 Context sensitive help .......................................................................................................... 3 1.4.2 Auto-completion ................................................................................................................... 3 1.4.3 Movement keys .................................................................................................................... 3 1.4.4 Deletion keys ....................................................................................................................... 4 1.4.5 Escape sequences .............................................................................................................. 4 2 Command Line Interface Overview ..............................................................................................
    [Show full text]